PasteRack.org | ||
Paste # 10137 | ||
2014-11-23 02:28:34 | ||
Forked from paste # 37221. | ||
Fork as a new paste. | ||
Paste viewed 247 times. | ||
Tweet | ||
Embed: | ||
#lang racket > (foldl cons '() '(1 2 3 4 5 6)) '(6 5 4 3 2 1) > (foldr cons '() '(1 2 3 4 5 6)) '(1 2 3 4 5 6) #lang heresy ; join is Heresy's consing operator > (foldl join '() '(1 2 3 4 5 6)) '((((((() . 1) . 2) . 3) . 4) . 5) . 6) > (foldr join '() '(1 2 3 4 5 6)) '(1 2 3 4 5 6)