Skip to content

Instantly share code, notes, and snippets.

@mzp
Created June 21, 2010 13:07
Show Gist options
  • Save mzp/446822 to your computer and use it in GitHub Desktop.
Save mzp/446822 to your computer and use it in GitHub Desktop.
type_ = [("d","42"),
("s","\"fish\"")]
flag = ["-","+",""]
gen = do f <- flag
(t,arg) <- type_
return $ "printf(\"%" ++ f ++ t ++ "\","++ arg ++ ")"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment