Search
Tuesday, 21st of December 2021, 19:46:41 UTC
21:51:32
utis
how come (reduce #'intersection '((a b c))) returns (a b c)?
21:53:13
Bike
because when you give reduce a one element list, it just returns the element.
21:53:48
Bike
you gave it a one element list, that element being (a b c).
21:55:19
yitzi
If you want other behavior then use :initial-value, but returning the set is more mathematically correct.
22:01:07
pjb
utis: (reduce #'intersection '((a b c)) :initial-value '(a b c d e f)) #| --> (c b a) |#
22:02:30
pjb
utis_: (reduce #'intersection '((a b c)) :initial-value '(a b c d e f)) #| --> (c b a) |#
22:10:24
utis_
i didn't realize this had nothing to do with #'intersection
22:10:41
Bike
yeah. reduce actually won't call intersection at all in this case.
22:13:22
Guest74
not to mention reducing with intersection wont get you what you're probably expecting.
22:14:51
pjb
why not. intersection reduction is useful.
22:16:16
Guest74
oops, i was thinking of set-difference.
0:24:48
jackdaniel
clim visualisation of fast gf dispatch for ecl (wip) https://i.imgur.com/fGGvPVK.png
1:12:40
hobo
in croatoan, what's the char for ESC?
1:30:43
Catie
Is it not just #\Esc?
1:32:11
hobo
i swear i tried that first -_-
1:32:30
hobo
anyway, thank you Catie
1:32:40
Catie
Any time! Glad it worked out
2:47:13
rotateq
hehe i saw a video from Edi where he talks about the 2nd version for his popular math book and in the end "so also my book 'Common Lisp Recipes', more a reference for advanced users, the dumb title isn't by me, but the publisher" ^^
4:00:27
beach
Good morning everyone!
4:01:10
asarch
Доброе утро beach! :-)
Wednesday, 22nd of December 2021, 7:46:41 UTC