Created
December 23, 2016 17:03
-
-
Save dknr/1c01a9fd454e2722cc4affbf1a16957c 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
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