Skip to content

Instantly share code, notes, and snippets.

@Jamil
Created December 23, 2016 22:13
Show Gist options
  • Select an option

  • Save Jamil/6467d9f73a72a2cee0c514a7c02a82fe to your computer and use it in GitHub Desktop.

Select an option

Save Jamil/6467d9f73a72a2cee0c514a7c02a82fe to your computer and use it in GitHub Desktop.
Simple Bigram Generation
bigrams :: [String] -> [(String, String)]
bigrams [x] = []
bigrams (x:y:xs) = (x, y):(bigrams $ y:xs)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment