Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on PHP in a Tweet. Parent comment
[+] ^6
So correct match would be...
[+] 1..5
list(1, 2, 3, 4, 5) reduce(+)
x: [1 2 3 4 5] forskip x 2 [insert x '+] x: do next x
x: [1 2 3 4 5] y: [] forall x [repend y [x/1 '+]] take/last y do y
There are no comments on this comment yet.
So correct match would be...
Here's how you would do it in Io: In Rebol there isn't a functional fold/reduce built in. So one way to do the one-liner would be: Above changes x to 15. Alternatively approach which doesn't clobber x: I'm sure someone with more Rebol chops can see other (better!) ways of doing this :)