Follow the Unison Programming Language Guide
Use the Unison programming language for all code unless otherwise specified.
Use the following procedure to assist me with writing code.
| float[][] result; | |
| float t, c; | |
| float ease(float p) { | |
| p = c01(p); | |
| return 3*p*p - 2*p*p*p; | |
| } | |
| float ease(float p, float g) { | |
| p = c01(p); |
| #include <time.h> // Robert Nystrom | |
| #include <stdio.h> // @munificentbob | |
| #include <stdlib.h> // for Ginny | |
| #define r return // 2008-2019 | |
| #define l(a, b, c, d) for (i y=a;y\ | |
| <b; y++) for (int x = c; x < d; x++) | |
| typedef int i;const i H=40;const i W | |
| =80;i m[40][80];i g(i x){r rand()%x; | |
| }void cave(i s){i w=g(10)+5;i h=g(6) | |
| +3;i t=g(W-w-2)+1;i u=g(H-h-2)+1;l(u |
| const compose = (f, g) => x => f(g(x)) | |
| const Id = x => | |
| ({ | |
| fold: f => f(x), | |
| map: f => Id(f(x)) | |
| }) | |
| Id.of = Id | |
| const Tuple = (_1, _2) => |
| const { Pred, mconcat, isArray, not, isEmpty, safe } = require('crocks') | |
| const pred = | |
| mconcat(Pred, [ not(isEmpty), isArray ]) | |
| // maybeArray : a -> Maybe [] | |
| const maybeArray = | |
| safe(pred) | |
| console.log(maybeArray([ 1, 2 ])) // Just [ 1, 2 ] |
| --compilers js:./test/support/compiler | |
| --require ./test/support/init |
THIS GIST WAS MOVED TO TERMSTANDARD/COLORS REPOSITORY.
PLEASE ASK YOUR QUESTIONS OR ADD ANY SUGGESTIONS AS A REPOSITORY ISSUES OR PULL REQUESTS INSTEAD!
A list of Sketch plugins hosted at GitHub, in no particular order.