MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1w767r8/schemeiselegant/
r/ProgrammerHumor • u/Limp_Illustrator7614 • Sep 04 '26
31 comments sorted by
41
car, cdr, caar, cadr, cdar, cddr, caaar, caadr, cadar, caddr, cdaar, cdadr, cddar, cdddr, caaaar, caaadr, caadar, caaddr, cadaar, cadadr, caddar, cadddr, cdaaar, cdaadr, cdadar, cdaddr, cddaar, cddadr, cdddar, cddddr
23 u/neromonero1024 Sep 05 '26
23
40
(define (head l) (car l)) (define (tail l) (cdr l))
Happy now?
2 u/-Redstoneboi- Sep 05 '26 you haven't defined first and rest
2
you haven't defined first and rest
35
I'm ngl u gave me war flashbacks with this one
27
It stands for contents of the address register, and contents of the decrement register.
And honestly, reading that out loud makes me think, yeah, maybe head and tail was the way to do it
8 u/djinn6 Sep 05 '26 Lisp is pretty close to the metal for a functional language. 4 u/remy_porter Sep 05 '26 Lisp is close to metal, like Dream Theater. 3 u/BringBackManaPots Sep 05 '26 I love it dearly
8
Lisp is pretty close to the metal for a functional language.
4 u/remy_porter Sep 05 '26 Lisp is close to metal, like Dream Theater. 3 u/BringBackManaPots Sep 05 '26 I love it dearly
4
Lisp is close to metal, like Dream Theater.
3
I love it dearly
(((((Lisp)))))
Share this in r/emacs
7
You know a good language tutor could help you out with that lisp you seem to have developed.
5
It was so bizzare. In highschool (Graduated 92) we learned Pascal and C. Went to University, fist year Scheme.
WTF?
1 u/LordAmir5 Sep 10 '26 Oh man. That's so messed up!We only learned about scheme in an elective about programming languages.
1
Oh man. That's so messed up!
We only learned about scheme in an elective about programming languages.
I don't know what language this refers to and I think I dodged a bullet there 😂
12 u/yjlom Sep 05 '26 Most lisps. They're about a 50/50 mix of the best features ever and the worst features ever. 4 u/alficles Sep 04 '26 It's shaped more like a boomerang than a bullet, but yes. :)
12
Most lisps. They're about a 50/50 mix of the best features ever and the worst features ever.
It's shaped more like a boomerang than a bullet, but yes. :)
Thanks, IBM 704
Ugh. Brings back bad memories of emacs lisp from 20 years ago.
I loved to use functions like cddddr tho. it was fun to tinker.
case list do[h|tail] -> …[]-> …end
Nightmare flashbacks to my undergraduate LISP class.
x, xs
no wait that's the variable name not the function
-2
tail is not the same as rest/cdr, tho
10 u/Limp_Illustrator7614 Sep 04 '26 edited Sep 04 '26 wait whyedit: i was refering to head/tail in haskell, erlang and elixir, which i believe is the same. 3 u/NullOfSpace Sep 04 '26 It is, yeah. Tail is long. -7 u/zoqfotpik Sep 04 '26 Tail points to the car of the last list element, not to the cdr of this list element. -10 u/suvlub Sep 04 '26 tail is the last element of the list. rest and cdr are the whole list without the first element. 2 u/rsqit Sep 05 '26 The last element of a list is sometimes called the "foot" (and everything before it the "neck"), though these are more joke terms than anything widely used.But "head" is the same as "car"; "tail" is the same as "cdr".
10
wait why
edit: i was refering to head/tail in haskell, erlang and elixir, which i believe is the same.
3 u/NullOfSpace Sep 04 '26 It is, yeah. Tail is long. -7 u/zoqfotpik Sep 04 '26 Tail points to the car of the last list element, not to the cdr of this list element. -10 u/suvlub Sep 04 '26 tail is the last element of the list. rest and cdr are the whole list without the first element. 2 u/rsqit Sep 05 '26 The last element of a list is sometimes called the "foot" (and everything before it the "neck"), though these are more joke terms than anything widely used.But "head" is the same as "car"; "tail" is the same as "cdr".
It is, yeah. Tail is long.
-7
Tail points to the car of the last list element, not to the cdr of this list element.
-10
tail is the last element of the list. rest and cdr are the whole list without the first element.
2 u/rsqit Sep 05 '26 The last element of a list is sometimes called the "foot" (and everything before it the "neck"), though these are more joke terms than anything widely used.But "head" is the same as "car"; "tail" is the same as "cdr".
The last element of a list is sometimes called the "foot" (and everything before it the "neck"), though these are more joke terms than anything widely used.
But "head" is the same as "car"; "tail" is the same as "cdr".
41
u/Abandondero Sep 05 '26
car, cdr, caar, cadr, cdar, cddr, caaar, caadr, cadar, caddr, cdaar, cdadr, cddar, cdddr, caaaar, caaadr, caadar, caaddr, cadaar, cadadr, caddar, cadddr, cdaaar, cdaadr, cdadar, cdaddr, cddaar, cddadr, cdddar, cddddr
40
u/MkemCZ Sep 04 '26
Happy now?
35
u/da99s Sep 04 '26
I'm ngl u gave me war flashbacks with this one
27
u/BringBackManaPots Sep 05 '26
It stands for contents of the address register, and contents of the decrement register.
And honestly, reading that out loud makes me think, yeah, maybe head and tail was the way to do it
27
u/DrHugh Sep 04 '26
(((((Lisp)))))
8
u/TabCompletion Sep 04 '26
Share this in r/emacs
7
u/Altruistic-Moose3299 Sep 05 '26
You know a good language tutor could help you out with that lisp you seem to have developed.
5
u/GreatGreenGobbo Sep 05 '26
It was so bizzare. In highschool (Graduated 92) we learned Pascal and C. Went to University, fist year Scheme.
WTF?
8
u/Organic-Ad3961 Sep 04 '26
I don't know what language this refers to and I think I dodged a bullet there 😂
3
u/high_throughput Sep 04 '26
Thanks, IBM 704
2
u/mearnsgeek Sep 04 '26
Ugh. Brings back bad memories of emacs lisp from 20 years ago.
2
u/eanat Sep 04 '26
I loved to use functions like cddddr tho. it was fun to tinker.
2
u/Candid-Log6751 Sep 04 '26
case list do
[h|tail] -> …
[]-> …
end
1
u/tuirn Sep 05 '26
Nightmare flashbacks to my undergraduate LISP class.
1
u/-Redstoneboi- Sep 05 '26
x, xs
no wait that's the variable name not the function
1
u/ExtraTNT Sep 05 '26
x, xs
-2
u/suvlub Sep 04 '26
tail is not the same as rest/cdr, tho