Skip to content

Instantly share code, notes, and snippets.

@rflechner
Created September 28, 2017 13:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rflechner/6755b35cbf21b4478ab2c582e808bb94 to your computer and use it in GitHub Desktop.
Save rflechner/6755b35cbf21b4478ab2c582e808bb94 to your computer and use it in GitHub Desktop.
let suffixedBy (suffix : string) baseSt = baseSt + suffix
let sayHello name = "Hello " + name
let toNode = // ?
let toBold = toNode "b"
let toBody= toNode "body"
let toParagraph= toNode "p"
let toHtml = toNode "html"
// Imperative style
let sayHelloHtml name =
toHtml
(toBody
(toParagraph
(toBold
(suffixedBy "!"
(sayHello name)))))
//"<html><body><p><b>Hello kevin!</b></p></body></html>"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment