An open API service indexing awesome lists of open source software.

https://github.com/typelift/operadics

Standard Operators for the working Swift Librarian.
https://github.com/typelift/operadics

Last synced: 11 months ago
JSON representation

Standard Operators for the working Swift Librarian.

Awesome Lists containing this project

README

          

# Operadics
Standard Operators for the working Swift Librarian.

Operators
---------

Operadics introduces the following operators at global scope

Operator | Name | Recommended Type
-------- | -------------- | ------------------------------------------
`•` | compose | `• (B -> C, A -> B) -> A -> C`
`§` | apply | `§
(A -> B, A) -> B`
`<\|` | apply | `<\|
(A -> B, A) -> B`
`\|>` | thrush | `\|>
(A, A -> B) -> B`
`<-` | extract | `<-
(M, A) -> Void`
`\|*\|` | on | `\|*\|
((B, B) -> C, A -> B) -> A -> A -> C`
`<>` | op | `<>
(A, A) -> A`
`<^` | replace | `<^
(A, F) -> F`
`^>` | replace | `^>
(F, B) -> F`
`<^>` | fmap | `<^>
(A -> B, F) -> F`
`<^^>` | imap | `<^^> (I -> J, F) -> F`
`` | contramap | `<^> (J -> I, F) -> F`
`<*>` | apply | `<*>
(F B>, F) -> F`
`>>-` | bind | `>>-
(F, A -> F) -> F`
`-<<` | bind | `-<<
(A -> F, F) -> F`
`>>->>` | Kleisli | `>>->>
(A -> F, B -> F) -> A -> F`
`<<-<<` | Kleisli | `<<-<<
(B -> F, A -> F) -> A -> F`
`->>` | extend | `->>
(F, F -> B) -> F`
`<<<` | r-t-l compose | `<<< (C, C
) -> C`
`>>>` | l-t-r compose | `>>> (C
, C) -> C`
`&&&` | split | `&&&
(A, A) -> A`
`***` | fanout | `***
(A, A) -> A<(B, D), (C, E)>`
`+++` | splat | `+++
(A, A) -> A, Either>`
`\|\|\|` | fanin | `\|\|\|
(A, A) -> A, D>`
`<+>` | op | `<+>
(A, A) -> A`
`` | retrieve | `
(JSONValue, JSONKeypath) -> A?`
`?` | opt retrieve | `?
(JSONValue, JSONKeypath) -> A??`
`(JSONValue, JSONKeypath) -> A`
`∪` | union | `∪
(Set, Set) -> Set`
`∩` | intersect | `∩
(Set, Set) -> Set`