Skip to content

Instantly share code, notes, and snippets.

@nh2
Created September 10, 2013 07:16
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nh2/6505995 to your computer and use it in GitHub Desktop.
Save nh2/6505995 to your computer and use it in GitHub Desktop.
Haskell Cucumber syntax - an alternative syntax proposed for Haskell along with normal Haskell and Literate Haskell
Feature: The Data.List module
In order to be able to use lists
As a programmer
I want a module that defines list functions
Scenario: Defining the function foldl
Given I want do define foldl
Which has the type (in brackets) a to b to a (end of brackets), to a, to list of b, to a
And my arguments are called f, acc, and l
When l is empty
Then the result better be acc
Otherwise l is x cons xs
Then the result should be foldl f (in brackets) f acc x (end of brackets) xs
@vilem-ff
Copy link

Good stuff. Need to work on better highlighting though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment