Skip to content

Instantly share code, notes, and snippets.

@turanct
turanct / game-of-life.scm
Last active October 28, 2021 16:56
Super simple Conway's game of life in scheme
(define create-coord
(lambda (x y)
(list x y)))
(define get-x
(lambda (coord)
(car coord)))
(define get-y
(lambda (coord)
@turanct
turanct / hangman.scm
Last active March 10, 2021 02:02
The Hangman game in Guile Scheme (lisp)
#!/usr/bin/env guile -s
!#
(use-modules
(srfi srfi-1)
(ice-9 rdelim))
(define words-path "words.txt")
(define random-word-from-file
@turanct
turanct / Main.hs
Last active January 11, 2017 08:25
Haskell Coffee Run
import Shop
main = do
contents <- getContents
let
inventory1 = inventoryFromFile contents
shop1 = Shop "Simon Says" inventory1
putStrLn $ show shop1
@turanct
turanct / Main.hs
Created July 3, 2017 13:45
Query Parser
import Text.ParserCombinators.Parsec
data Query = And Query Query
| Or Query Query
| Not Query
| Statement String deriving (Show)
andParser = do
arg1 <- statementParser
string " AND "