Skip to content

Instantly share code, notes, and snippets.

@dknr
Created December 23, 2016 17:03
Show Gist options
  • Save dknr/1c01a9fd454e2722cc4affbf1a16957c to your computer and use it in GitHub Desktop.
Save dknr/1c01a9fd454e2722cc4affbf1a16957c to your computer and use it in GitHub Desktop.
let stringify str = str.ToString()
let invert x = x * -1
let middleware (next : string list -> string) (req : string list) : string =
req
|> Dump
|> List.append ["hello"]
|> next
|> Dump
let translator (next : int -> int) (req: string list) : string =
req
|> Dump
|> List.length
|> next
|> stringify
|> Dump
let endpoint req =
req
|> Dump
|> invert
|> Dump
let pipeline =
endpoint
|> translator
|> middleware
|> middleware
pipeline ["input"]
|> Dump
|> ignore
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment