Skip to content

Instantly share code, notes, and snippets.

@hugosenari
Last active March 20, 2024 19:43
Show Gist options
  • Save hugosenari/7b6b6ea10b4194bdbbe0f5c84b1fa76d to your computer and use it in GitHub Desktop.
Save hugosenari/7b6b6ea10b4194bdbbe0f5c84b1fa76d to your computer and use it in GitHub Desktop.
Pragma Helper
Identity Closed Pure Associative Commutative Feature
NoOP early return of X
Memoise early return cache
Idempotent early return cache
Map No need to define
Reduce No need to define
ParMap Parallel Map
ParReduce Parallel Reduce
Means f(X,O) = X F[T](X,Y: T): T F(X,Y)=F(X,Y) F(F(X,Y), Z)=F(X,F(Y,Z)) F(X,Y)=F(Y,X)
@hugosenari
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment