Share your repls and programming experiences

← Back to all posts
#WEEKLY 17 FUNCTIONAL FIB
Jakman (462)

It works. It uses a functional algo to find a fib via the Iterator trait being implemented.

Commentshotnewtop
TheDrone7 (1527)

I don't see the fibonacci series being generated.

Jakman (462)

@TheDrone7 it generates the fib series manually by calling .next on a fib object

TheDrone7 (1527)

@Jakman It only prints [1, 2, 3] and that is not the fib series.

Jakman (462)

@TheDrone7 it skips the first 1 for some reason

TheDrone7 (1527)

@Jakman Well, that would be a DQ then I'm afraid.

fuzzyastrocat (1463)

Nice! Though in other posts map has been considered disallowed, so might want to change that if possible