Skip to main content
edited body
Source Link
Ben Reich
  • 1.6k
  • 9
  • 16

GolfScript, 2 Haikus

),{0>},{,,*}*

Read as haiku, enumerating each keystroke:

#close parenthesis
#comma open-brace zero
#greater-than close-brace

#comma open-brace
#comma comma asterisk
#close-brace asterisk

With test case (5 haikus):

[1 2 3]4+          #generate the array [1 2 3 4]
{                  #start creating block
),{0>},{,,*}*      #actual factorial code
}%                 #close block and map across array (so that we should have [1! 2! 3! 4!])
[1 2 6]2.3**12++=  #generate the array [1 2 6 24] and check for equality

Read as haiku:

#open-bracket one
#space two space three close-bracket
#four- plus open-brace

#close parenthesis
#comma open-brace zero
#greater-than close-brace

#comma open-brace
#comma comma asterisk
#close-brace asterisk

#close-brace percent-sign
#open-bracket one space two
#space six close-bracket

#two period three
#asterisk asterisk one
#two plus plus equals

GolfScript, 2 Haikus

),{0>},{,,*}*

Read as haiku, enumerating each keystroke:

#close parenthesis
#comma open-brace zero
#greater-than close-brace

#comma open-brace
#comma comma asterisk
#close-brace asterisk

With test case (5 haikus):

[1 2 3]4+          #generate the array [1 2 3 4]
{                  #start creating block
),{0>},{,,*}*      #actual factorial code
}%                 #close block and map across array (so that we should have [1! 2! 3! 4!])
[1 2 6]2.3**12++=  #generate the array [1 2 6 24] and check for equality

Read as haiku:

#open-bracket one
#space two space three close-bracket
#four-plus open-brace

#close parenthesis
#comma open-brace zero
#greater-than close-brace

#comma open-brace
#comma comma asterisk
#close-brace asterisk

#close-brace percent-sign
#open-bracket one space two
#space six close-bracket

#two period three
#asterisk asterisk one
#two plus plus equals

GolfScript, 2 Haikus

),{0>},{,,*}*

Read as haiku, enumerating each keystroke:

#close parenthesis
#comma open-brace zero
#greater-than close-brace

#comma open-brace
#comma comma asterisk
#close-brace asterisk

With test case (5 haikus):

[1 2 3]4+          #generate the array [1 2 3 4]
{                  #start creating block
),{0>},{,,*}*      #actual factorial code
}%                 #close block and map across array (so that we should have [1! 2! 3! 4!])
[1 2 6]2.3**12++=  #generate the array [1 2 6 24] and check for equality

Read as haiku:

#open-bracket one
#space two space three close-bracket
#four plus open-brace

#close parenthesis
#comma open-brace zero
#greater-than close-brace

#comma open-brace
#comma comma asterisk
#close-brace asterisk

#close-brace percent-sign
#open-bracket one space two
#space six close-bracket

#two period three
#asterisk asterisk one
#two plus plus equals
added 836 characters in body
Source Link
Ben Reich
  • 1.6k
  • 9
  • 16

GolfScript, 2 Haikus

),{0>},{,,*}*

Read as haiku, enumerating each keystroke:

#close parenthesis
#comma open-brace zero
#greater-than close-brace

#comma open-brace
#comma comma asterisk
#close-brace asterisk

With test case (5 haikus):

[1 2 3]4+          #generate the array [1 2 3 4]
{                  #start creating block
),{0>},{,,*}*      #actual factorial code
}%                 #close block and map across array (so that we should have [1! 2! 3! 4!])
[1 2 6]2.3**12++=  #generate the array [1 2 6 24] and check for equality

Read as haiku:

#open-bracket one
#space two space three close-bracket
#four-plus open-brace

#close parenthesis
#comma open-brace zero
#greater-than close-brace

#comma open-brace
#comma comma asterisk
#close-brace asterisk 

#close-brace percent-sign
#open-bracket one space two
#space six close-bracket

#two period three
#asterisk asterisk one
#two plus plus equals

GolfScript, 2 Haikus

),{0>},{,,*}*

#close parenthesis
#comma open-brace zero
#greater-than close-brace

#comma open-brace
#comma comma asterisk
#close-brace asterisk

GolfScript, 2 Haikus

),{0>},{,,*}*

Read as haiku, enumerating each keystroke:

#close parenthesis
#comma open-brace zero
#greater-than close-brace

#comma open-brace
#comma comma asterisk
#close-brace asterisk

With test case (5 haikus):

[1 2 3]4+          #generate the array [1 2 3 4]
{                  #start creating block
),{0>},{,,*}*      #actual factorial code
}%                 #close block and map across array (so that we should have [1! 2! 3! 4!])
[1 2 6]2.3**12++=  #generate the array [1 2 6 24] and check for equality

Read as haiku:

#open-bracket one
#space two space three close-bracket
#four-plus open-brace

#close parenthesis
#comma open-brace zero
#greater-than close-brace

#comma open-brace
#comma comma asterisk
#close-brace asterisk 

#close-brace percent-sign
#open-bracket one space two
#space six close-bracket

#two period three
#asterisk asterisk one
#two plus plus equals
Source Link
Ben Reich
  • 1.6k
  • 9
  • 16

GolfScript, 2 Haikus

),{0>},{,,*}*

#close parenthesis
#comma open-brace zero
#greater-than close-brace

#comma open-brace
#comma comma asterisk
#close-brace asterisk