Created
April 7, 2016 12:56
-
-
Save kosmikus/f64a05473ac5c021f9ae3130817fc0f6 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
type PermApi1 = | |
"a" :> "b" :> "c" :> Get '[JSON] () | |
:<|> "b" :> "a" :> "c" :> Get '[JSON] () | |
:<|> "a" :> "c" :> "b" :> Get '[JSON] () | |
:<|> "c" :> "a" :> "b" :> Get '[JSON] () | |
:<|> "b" :> "c" :> "a" :> Get '[JSON] () | |
:<|> "c" :> "b" :> "a" :> Get '[JSON] () | |
Output: | |
<root> | |
├─ a | |
│ ├─ b | |
│ │ └─ c | |
│ │ └─• | |
│ └─ c | |
│ └─ b | |
│ └─• | |
├─ b | |
│ ├─ a | |
│ │ └─ c | |
│ │ └─• | |
│ └─ c | |
│ └─ a | |
│ └─• | |
└─ c | |
├─ a | |
│ └─ b | |
│ └─• | |
└─ b | |
└─ a | |
└─• | |
type PermApi2 = | |
"a" :> "b" :> "c" :> Get '[JSON] () | |
:<|> "b" :> "a" :> "c" :> Get '[JSON] () | |
:<|> "a" :> "c" :> "b" :> Get '[JSON] () | |
:<|> "c" :> "a" :> "b" :> Get '[JSON] () | |
:<|> "b" :> "c" :> "a" :> Get '[JSON] () | |
:<|> "c" :> "b" :> "a" :> Get '[JSON] () | |
:<|> Raw | |
Output: | |
<root> | |
┆ | |
├─ a | |
│ └─ b | |
│ └─ c | |
│ └─• | |
┆ | |
┆ | |
├─ b | |
│ └─ a | |
│ └─ c | |
│ └─• | |
┆ | |
┆ | |
├─ a | |
│ └─ c | |
│ └─ b | |
│ └─• | |
┆ | |
┆ | |
├─ c | |
│ └─ a | |
│ └─ b | |
│ └─• | |
┆ | |
┆ | |
├─ b | |
│ └─ c | |
│ └─ a | |
│ └─• | |
┆ | |
┆ | |
├─ c | |
│ └─ b | |
│ └─ a | |
│ └─• | |
┆ | |
└─• |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment