Re: functional programming



I started to learn Common Lisp and I saw that it is a great language.
You have interpreter but you can also compile code. On list of projects made
by CL is even an operating system. That's impossible with Ruby and
interpreted languages in general. You have functional language which is also
pure object oriented like Smalltalk or Ruby. Haskell is pure functional
language and I don't see how programmers can manage large portions of code
without objects. It's like procedural language with functions instead of
procedures.
And also CL has a lot of other advantages. As I understood Pascal, you can
make code that makes other code and you have support for logic programming
like Prolog.



"Haris Bogdanovic" <fbogdanovic@xxxxxxx> wrote in message
news:gk3m77$1ft$1@xxxxxxxxxxxxxxxxxx
Hi.

I'm starting to learn functional programming with Ruby.
I would like for someone to write me an example of finding the smallest
number in the list and a sorting algorithm.
I got the concept of map (collect), filter (select, detect and reject) and
reduce (inject) higher order functions but I don't know how to compose
algorithms from them.
So please write me those two algorithms or some other simple ones with
some explanation.
Some links to this subject would be nice also.

Thanks
Haris



.



Relevant Pages

  • Re: How to solve for smallest and largest int?
    ... generate a simple algorithm has no business trying to learn Ada. ... then recommended Basic or C as a first language. ... lot of bad programming practices using Basic. ... Algorithms interact with data structures to produce programs. ...
    (comp.programming)
  • Re: why learn C?
    ... programming beginner. ... Any language that allows subroutines is procedural based. ... you can learn about algorithms and data structures ...
    (comp.lang.c)
  • Re: Why Ive returned
    ... It was a parody of an absurd idea. ... not have the C language required to major at Kernighan's Princeton, ... Kernighan and John Hennessy, the RISC computer architect, rejected the ... the firmware interpreter for 1401 code on the old IBM 360 mainframe, ...
    (comp.programming)
  • Re: Software bugs arent inevitable
    ... There are lots of algorithms that could be done, ... Except for the mere implementation detail that Python doesn't have ... That illustrates my original point that a programming strategy that seems ... we'd still be programming in assembly language. ...
    (comp.lang.python)
  • Re: why learn C?
    ... i think programming is different from Software Engineering. ... then I can find other algorithms I have needed which are ... *not* part of which ever language you choose to select. ... and you will have done at least some algorithm development whether you ...
    (comp.lang.c)