Moderators: They make you lose count(Longest thread still alive!)

Strikingwolf

New Member
Jul 29, 2019
3,709
-26
1
(iterate inc 1) means to make a lazy list by doing inc (+ 1) forever with the starting value of 1

(take 67) means to take the first 67 items in a list. So something like (take 2 '(1 2 3 4 5)) would return '(1 2)

last simply means the last thing in a list

(->> 3 (* 20) (+ (* 3 3)))
 

Someone Else 37

Forum Addict
Feb 10, 2013
1,876
1,440
168
70 I more or less got those parts (take and last are the same in Haskell, and iterate inc was pretty clear, although the Haskell version is [1..]); it was mostly "macro", "thread-first", and "thread-last" that don't mean anything to me. Yet.
 

Strikingwolf

New Member
Jul 29, 2019
3,709
-26
1
71

Macro means to take a raw piece of code and make it into something the compiler/interpreter can understand, kinda. Thread first means to take the first value and put it as the first argument to the second function and take that value and put it into the third and so on. Thread last means to put it as the last arg instead of the first
 

Strikingwolf

New Member
Jul 29, 2019
3,709
-26
1
74 @Someone Else 37 yeah, but it is extremely powerful. Alost all of Clojure is implemented using functions and macros. Macros can be used to make the and statement and even lower level things.
 

DrowElf

New Member
Jul 29, 2019
649
-3
0
83 I keep forgetting that you retired, and I have that "shit he reset the count" moment before remembering