Created
June 12, 2018 21:02
-
-
Save giacomociti/44eac83254ecfd17fb499c1a8bf5cb65 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#r "System.Xml.Linq" | |
open System.Xml.Linq | |
let htmlSummary primo secondo = | |
let tag name content = XElement(XName.Get name, content) | |
let em (text: string) = tag "em" [| text |] | |
let li key value = tag "li" [| key; em value |] | |
[| | |
li "primo" primo | |
li "secondo" secondo | |
|] | |
|> Array.map box | |
|> tag "ul" | |
|> sprintf "<p>today's menu:</p>%A" | |
htmlSummary | |
"pasta & fagioli" | |
"cinghiale mantecato" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment