It also supports Forth and Nim, which can be written in a somewhat concatenative style, too.

  • AndyOPM
    link
    fedilink
    arrow-up
    2
    ·
    1 year ago

    To celebrate, here’s my crappy Fizz Buzz solution!

    USING: io kernel math.functions math.parser ranges sequences ;
    
    100 [1..b] [ 
      dup [ 3 divisor? ] [ 5 divisor? ] bi 2dup or [ 
        [ drop ] 2dip 
        [ "Fizz" "" ? ] [ "Buzz" "" ? ] bi* append 
      ] [ 2drop number>string ] if
      print 
    ] each
    

    And for comparison: a Fizz Buzz walkthrough post from Factor dev John B.