Totally new to this
#11

Do you think C++ has a darn syntax try Functional Programming (I only posted Haskell), Wondering who is a Haskell fan:

length :: [a] -> Integer
length [] = 0
length (x:xs) = 1 + length xs

This translates:

integer length(list ){
if(list.is_empty)
return 0;
return 1+length(list.remove_first_element);
}

 

No wonder the Haskell has a Lazy evaluation.



Forum Jump:


Users browsing this thread: 1 Guest(s)