>>3-4,7,9-10
Why so hateful on OP? This thread is surely better than more of the half of the threads on /prog/'s front page. I don't even use Haskell, and I find it baffling that you'd want to prevent actual programming discussion.
Might I suggest you go back to /b/, and take those "sex vs programming" threads there with you too!
Name:
Anonymous2009-12-25 21:06
As long as you dont return a fucking pointer to the stack... its fine.
Have fun but its better to use pointers.
Each time some fucktarded c++ "programmer" goes arround passing huge classes as value a copy constructor dies.
Name:
Anonymous2009-12-25 21:06
As long as you dont return a fucking pointer to the stack... its fine.
Have fun but its better to use pointers.
Each time some fucktarded c++ "programmer" goes arround passing huge classes as value a copy constructor dies.
>>14
Why would you? ($) is just one character more and makes your intent clearer.
Name:
Anonymous2010-01-08 0:41
>>2
Function application has a higher precedence than any user-defined operator. Just remove the parens. Write sin x ^ 2, not (sin x) ^ 2. Also, please always use spaces around all binary operators, so that words . lines is consistent with Just . lines (since Just.lines means "the function lines in the module Just")
>>29
Yes, you're right. For some reason I thought he was referring to >>24, instead of >>18 and drew my conclusions based on that(with the presumption that it was wrong) Perhaps I should get my eyes tested (and learn Haskell while I'm at it)
Name:
Anonymous2010-01-08 17:05
>>18 GHCi, version 6.8.2: http://www.haskell.org/ghc/ :? for help
Loading package base ... linking ... done.
Prelude> let f = (+ 2)
Prelude> f 1
3
Prelude> (id f) 1
3
What do you mean "syntactically illegal"?
Name:
Anonymous2010-01-08 17:10
>>31
It think it's syntactically illegal to define the function as (f x) y = x y, as f would have to be a data constructor.
Prelude> let (f x) y = x y
Prelude> :t f
f :: (t -> t1) -> t -> t1
Prelude> let (f x) y = x y
Prelude> :t f
f :: (t -> t1) -> t -> t1
Prelude> :t let (f *** g) x y = (f x, g y) in (***)
let (f *** g) x y = (f x, g y) in (***)
:: (t -> t1) -> (t2 -> t3) -> t -> t2 -> (t1, t3)
Prelude>
Educators, generals, dieticians, psychologists, and parents program. Armies, students, and some societies are programmed. An assault on large problems employs a succession of programs, most of which spring into existence en route. These programs are rife with issues that appear to be particular to the problem at hand. To appreciate programming as an intellectual activity in its own right you must turn to computer programming; you must read and write computer programs -- many of them. It doesn't matter much what the programs are about or what applications they serve. What does matter is how well they perform and how smoothly they fit with other programs in the creation of still greater programs. The programmer must seek both perfection of part and adequacy of collection. In this book the use of ``program'' is focused on the creation, execution, and study of programs written in a dialect of Lisp for execution on a digital computer. Using Lisp we restrict or limit not what we may program, but only the notation for our program descriptions.