@AndyM to Concatenative Programming • 1 year agocode.golf now accepts Factor solutionscode.golfexternal-linkmessage-square1arrow-up14arrow-down10file-text
arrow-up14arrow-down1external-linkcode.golf now accepts Factor solutionscode.golf@AndyM to Concatenative Programming • 1 year agomessage-square1file-text
minus-square@AndyOPMlink2•1 year agoTo 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.
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.