<interactive>:1:0:
Couldn't match `Integer' against `t -> t1'
Expected type: Integer
Inferred type: t -> t1
Probable cause: `fac' is applied to too many arguments in the call (fac 4)
In the definition of `it': it = fac 4
Prelude>
Phail.
Name:
Anonymous2007-08-09 19:29 ID:AKgIEBvD
>>9 OKAY YOU FUQIN ANGERED AN EXPERT PROGRAMMER
GODFUCKIGNDAMN
FIRST OF ALL, YOU DONT FUQIN KNOW WHAT A MAN PAGE IS
SECONDLY, THIS IS /prog/ DO NOT DEMAND USEFUL ANSWERS THE WAY YOU WANT THEM TO BE
THIRDLY PROGRAMMING IS ALL ABOUT PHILOSOPHY AND ``ABSTRACT BULLSHITE'' THAT YOU WILL NEVER COMPREHEND
AND FUQIN LASTLY, FUCK OFF WITH YOUR BULLSHYT
EVERYTHING HAS ALREADY BEEN ANSWERED IN>>6,7,8
>>12
Is apply some kind of fold? (I don't know Lisp yet)
>>13
Sorry, but you're the idiot. The function you posted doesn't take any arguments and will just attempt to calculate the product of the infinite list [1..]. Did you think any given parameter would somehow magically be injected as a right bound into the syntactic sugar? You clearly don't have a very good understanding of eta reduction.
Name:
Anonymous2007-08-09 23:10 ID:wWgruhbF
>>14
1) its called BETA reduction faggot
2) POINTLESS FUNCTIONS IN POINTLESS STYLE
3) Haskell is lazy, discussion over
4) NO U!
5) I invented the [sup] and [sub] tags, you are ETERNALLY IN DEBT TO ME.
>>14 OKAY YOU FUQIN ANGERED AN EXPERT PROGRAMMER
GODFUCKIGNDAMN
FIRST OF ALL, YOU DONT FUQIN KNOW WHAT A MAN PAGE IS
SECONDLY, THIS IS /prog/ DO NOT DEMAND USEFUL ANSWERS THE WAY YOU WANT THEM TO BE
THIRDLY PROGRAMMING IS ALL ABOUT PHILOSOPHY AND ``ABSTRACT BULLSHITE'' THAT YOU WILL NEVER COMPREHEND
AND FUQIN LASTLY, FUCK OFF WITH YOUR BULLSHYT
EVERYTHING HAS ALREADY BEEN ANSWERED IN >>15
Name:
Anonymous2007-08-09 23:15 ID:/fqA7NlS
>>15,16
Potentially the same person, proceed with caution.
>>14
no, not really. apply receives a function and a list, then makes the list the arguments of the function. So (apply * '(1 2 3)) is equivalent to (* 1 2 3). range n m returns a list (n n+1 ... m). so we get (* n n+1 n+2 ... m). * takes multiple arguments. actually, I'm not sure (*) returns 1, so this does not handle the base case correctly. other options are (reduce * 1 lst), reduce being equal to fold, or consing a 1. this makes it more or less equivalent to the haskell version, since product is probably something like product = foldr (*) 1
Name:
Anonymous2007-08-09 23:38 ID:JuIjVnEO
: fac ( n -- n! ) 1+ 1 tail product ;
Name:
Anonymous2007-08-10 0:00 ID:6UxIbwif
>>15 1) BETA REDUCTION IS FUNCTION APPLICATION, THIS IS NOT WHAT I AM TALKING ABOUT
2) POINTFREE STYLE IS ELEGANT AND YOU ARE MADE OF FAIL
3) LAZINESS HAS NOTHING TO DO WITH THIS. PRODUCT WILL FAIL TO TERMINATE WHEN GIVEN AN INFINITE LIST
4) NEIN DU
5) SUP AND SUB HAVE BEEN (AB)USED ON DQN FOR MONTHS ALREADY
GET THE FUCK OUT
Name:
Anonymous2007-08-10 1:11 ID:zu0/65CA
(((ok bitch)
(you asked for it)
(here goes))
(im taking outthe fucking
(bold paranthesis on you))
(you fuqing angered an expert programmer)
(ive been here for (expt 3 88888000) years longer than you)
(ive read sicp twice)
(i know every programming language inthe world
including apl)
(if u wanna batl (lets do it))
(ill crush you like a bean))
Name:
Anonymous2007-08-10 1:26 ID:em4J9rOF
fac = foldr (*) . enumFromTo 1
Name:
Anonymous2007-08-10 1:59 ID:PPrnF8K7
it's
fac n = product [1..n]
you haskell niggers.
Name:
Anonymous2007-08-10 2:01 ID:xrQSvt5E
[b]([/b][b]([/b][b]([/b]ok bitch[b])[/b]
[b]([/b]you asked for it[b])[/b]
[b]([/b]here goes[b])[/b][b])[/b]
[b]([/b]im taking out the fucking
[b]([/b]bold paranthesis on you[b])[/b][b])[/b]
[b]([/b]you fuqing angered an expert programmer[b])[/b]
[b]([/b]ive been here for [b]([/b]expt 3 88888000[b])[/b] years longer than you[b])[/b]
[b]([/b]ive read sicp twice[b])[/b]
[b]([/b]i know every programming language in the world
including apl[b])[/b]
[b]([/b]if u wanna batl [b]([/b]lets do it[b])[/b][b])[/b]
[b]([/b]ill crush you like a bean[b])[/b][b])[/b]
Name:
Anonymous2007-08-10 2:02 ID:xrQSvt5E
(((ok bitch) (you asked for it) (here goes)) (im taking out the fucking (bold paranthesis on you)) (you fuqing angered an expert programmer) (ive been here for (expt 3 88888000) years longer than you) (ive read sicp twice) (i know every programming language in the world
including apl) (if u wanna batl (lets do it)) (ill crush you like a bean))
Name:
Anonymous2007-08-10 2:02 ID:xrQSvt5E
[b]([/b][b]([/b][b]([/b]ok bitch[b])[/b]
[b]([/b]you asked for it[b])[/b]
[b]([/b]here goes[b])[/b][b])[/b]
[b]([/b]im taking out the fucking
[b]([/b]bold paranthesis on you[b])[/b][b])[/b]
[b]([/b]you fuqing angered an expert programmer[b])[/b]
[b]([/b]ive been here for [b]([/b]expt 3 88888000[b])[/b] years longer than you[b])[/b]
[b]([/b]ive read sicp twice[b])[/b]
[b]([/b]i know every programming language in the world
including apl[b])[/b]
[b]([/b]if u wanna batl [b]([/b]lets do it[b])[/b][b])[/b]
[b]([/b]ill crush you like a bean[b])[/b][b])[/b]
>>24 YOU ARE FUCKING RETARDED
AT THE VERY LEAST
FUCKING TEST YOUR CODE BEFORE YOU POST IT
FOLDR TAKES THREE ARGUMENTS
MAYBE YOU MEANT ``foldr (*) 1''
WHICH CAN ALSO BE WRITTEN AS ``product''
HOW ABOUT FUCKING READING THE THREAD BEFORE POSTING
SEE FOR EXAMPLE:>>6
(((ok bitch) (you asked for it) (here goes)) (im taking out the fucking (bold paranthesis on you)) (you fuqing angered an expert programmer) (ive been here for(expt 3 88888000)years longer than you) (ive read sicp twice) (i know every programming language in the world including apl) (if u wanna batl(lets do it)) (ill crush you like a bean))
Here's my source code for this precious kopipe (which I invented) released to public domain:
[b][code]([/code][/b][b][code]([/code][/b][b][code]([/code][/b][code]ok bitch[/code][b][code])[/code][/b]
[b][code]([/code][/b][code]you asked for it[/code][b][code])[/code][/b]
[b][code]([/code][/b][code]here goes[/code][b][code])[/code][/b][b][code])[/code][/b]
[b][code]([/code][/b][code]im taking out the fucking[/code]
[b][code]([/code][/b][code]bold paranthesis on you[/code][b][code])[/code][/b][b][code])[/code][/b]
[b][code]([/code][/b][code]you fuqing angered an expert programmer[/code][b][code])[/code][/b]
[b][code]([/code][/b][code]ive been here for[/code] [b][code]([/code][/b][code]expt 3 88888000[/code][b][code])[/code][/b] [code]years longer than you[/code][b][code])[/code][/b]
[b][code]([/code][/b][code]ive read sicp twice[/code][b][code])[/code][/b]
[b][code]([/code][/b][code]i know every programming language in the world[/code]
[code]including apl[/code][b][code])[/code][/b]
[b][code]([/code][/b][code]if u wanna batl[/code] [b][code]([/code][/b][code]lets do it[/code][b][code])[/code][/b][b][code])[/code][/b]
[b][code]([/code][/b][code]ill crush you like a bean[/code][b][code])[/code][/b][b][code])
Name:
Anonymous2007-08-10 7:45 ID:xrQSvt5E
(((ok bitch) (you asked for it) (here goes)) (im taking out the fucking (bold paranthesis on you)) (you fuqing angered an expert programmer) (ive been here for(expt 3 88888000)years longer than you) (ive read sicp twice) (i know every programming language in the world including apl) (if u wanna batl(lets do it)) (ill crush you like a bean)[b][code])
Name:
Anonymous2007-08-10 7:46 ID:xrQSvt5E
>>52 here
Sorry about that, there was a bug in my source. Here's the patched, copy-pastable version:
[b][code]([/code][/b][b][code]([/code][/b][b][code]([/code][/b][code]ok bitch[/code][b][code])[/code][/b]
[b][code]([/code][/b][code]you asked for it[/code][b][code])[/code][/b]
[b][code]([/code][/b][code]here goes[/code][b][code])[/code][/b][b][code])[/code][/b]
[b][code]([/code][/b][code]im taking out the fucking[/code]
[b][code]([/code][/b][code]bold paranthesis on you[/code][b][code])[/code][/b][b][code])[/code][/b]
[b][code]([/code][/b][code]you fuqing angered an expert programmer[/code][b][code])[/code][/b]
[b][code]([/code][/b][code]ive been here for[/code] [b][code]([/code][/b][code]expt 3 88888000[/code][b][code])[/code][/b] [code]years longer than you[/code][b][code])[/code][/b]
[b][code]([/code][/b][code]ive read sicp twice[/code][b][code])[/code][/b]
[b][code]([/code][/b][code]i know every programming language in the world[/code]
[code]including apl[/code][b][code])[/code][/b]
[b][code]([/code][/b][code]if u wanna batl[/code] [b][code]([/code][/b][code]lets do it[/code][b][code])[/code][/b][b][code])[/code][/b]
[b][code]([/code][/b][code]ill crush you like a bean[/code][b][code])[/code][/b][b][code])[/code][/b]
Name:
Anonymous2007-08-10 7:47 ID:xrQSvt5E
(((ok bitch) (you asked for it) (here goes)) (im taking out the fucking (bold paranthesis on you)) (you fuqing angered an expert programmer) (ive been here for(expt 3 88888000)years longer than you) (ive read sicp twice) (i know every programming language in the world including apl) (if u wanna batl(lets do it)) (ill crush you like a bean))
Name:
Anonymous2007-08-10 8:27 ID:zu0/65CA
>>55
you're getting close, but still not managed it FOOL!
Name:
Anonymous2009-01-14 15:17
WTF
Name:
Anonymous2009-03-06 9:17
The same manner that the head had earlier The long RUN MY PRODUCT IS SHITTIER BY.