Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Fibs in your favourite language

Name: Anonymous 2008-12-20 15:04

fibs = 1 : zipWith (+) fibs (tail fibs)

Name: Anonymous 2008-12-21 22:54

How am I supposed to use switch in this situation, when I need to examine two variables?
ok, since you're too stupid to figure this out, i'll do it for you:
: ackermann ( m n -- r )
{
    { [ drop 0 = ] [ nip 1+ ] }
    { [ [ 0 > ] [ 0 = ] bi* and ] [ drop 1- 1 ackermann ] }
    { [ [ 0 > ] both? ] [ [ [ 1- ] keep ] dip 1- ackermann ackermann ] }
} switch ;


And why are you suggesting I change my last branch from a version with one shuffle word to a version with the exact same shuffle word?
i wasn't suggesting you change it to that version, i was simply pointing you in the right direction.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List