quiz. write a function recurseList(f,x,n) that returst a list, [f(x), f(f(x)), ...], length n.
1 01 Nov 2017 05:17 by u/plankO
write in your fav lang. haskell, javascript, golang
1 01 Nov 2017 05:17 by u/plankO
write in your fav lang. haskell, javascript, golang
10 comments
2 u/ajNzSDlz 01 Nov 2017 12:54
C++:
0 u/mooseattack 06 Nov 2017 03:00
nice
2 u/BeniBela 02 Nov 2017 12:49
XQuery:
0 u/shill343 01 Nov 2017 05:51
Bit new to all of this, can I get a bit more info on the input and output this function needs to provide.
0 u/AnmanIndustries 01 Nov 2017 05:52
If I was at home and had the time to waste, I would do this in the warcraft 3 world editor.
0 u/TumsFestival 01 Nov 2017 06:03
Perl 5:
example:
outputs:
0 u/rwbj 01 Nov 2017 07:16
Not familiar with Perl but that looks to me like your recurseList function is just mapping the result of a function onto a list. So if you used a doubler function it would return (for n = 5): 2, 4, 6, 8, 10 - which is incorrect.
0 u/TumsFestival 01 Nov 2017 12:09
$xis mutated: it receives the previous call's result and becomes the next call's argument.outputs:
0 u/rwbj 01 Nov 2017 07:00
Sample usage:
0 u/bman0321 01 Nov 2017 14:37
TIL, how to con others into doing my coding take home tests.