aboutsummaryrefslogtreecommitdiff
path: root/examples/custom-effect.ts
diff options
context:
space:
mode:
Diffstat (limited to 'examples/custom-effect.ts')
-rw-r--r--examples/custom-effect.ts15
1 files changed, 9 insertions, 6 deletions
diff --git a/examples/custom-effect.ts b/examples/custom-effect.ts
index 5fbffed..3dbe395 100644
--- a/examples/custom-effect.ts
+++ b/examples/custom-effect.ts
@@ -1,15 +1,18 @@
import { Bind, DefineEffect, Effect, Kind1, Print } from '../stdlib'
-interface Mathemagic<_A, _B> extends Effect { }
+interface Mathemagic<_A, _B> extends Effect {}
interface PrintK extends Kind1 {
return: Print<this['input']>
}
export type main = [
- DefineEffect<"Mathemagic", `(a, b) => {
- console.log(typeToString(a))
- return { result: 5 * b.getLiteralValue() }
- }`>,
- Bind<Mathemagic<"a", 69>, PrintK>,
+ DefineEffect<
+ 'Mathemagic',
+ `(a, b) => {
+ console.log(typeToString(a))
+ return { result: 5 * b.getLiteralValue() }
+ }`
+ >,
+ Bind<Mathemagic<'a', 69>, PrintK>
]