# Re: [stack] Re: 'stack' and 'unstack' in F (correction)

## stevan apter — 2006-07-12 23:10:52

    > here are the definitions in F's joy dialect:

    >

    > [[dup count [] top] dip swap [quote uncons dip dup top

    >  [cons unit apply first swons] dipd] do pop pop rev] map

    >

    > [quote stack dipd [quote unit map quote join right] dip

    >  quote join left [unit apply last] map] Map

    >

    > as you can see, 'Map' uses 'stack', 'map' does not.

    >

    > nb:

    >

    > quote x -> [x]

    > x y z top -> z x y

    > [x y z] rev -> [z y x]

    > x [y z w] f -> [x y f i x z f i x w f i]

     this should be:

    x [y z w] f right -> [x y f i x z f i x w f i]

    that is, apply f to x and each thing on the right of x.