UNPKG
contracts-js
Version:
latest (0.6.3)
0.6.3
0.6.2
0.6.1
0.6.0
0.5.0
0.4.3
0.4.2
0.4.1
0.4.0
0.3.4
0.3.3
0.3.2
A contract library for JavaScript
disnetdev.com/contracts.js/
disnet/contracts.js
contracts-js
/
examples
/
dependent-indy.js
9 lines
(6 loc)
•
220 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
import
@
from
"contracts.js"
// note that the contract itself uses `f` wrong
// and thus will be blamed
@ (
f
: (
Num
) ->
Num
) ->
res
:
Num
|
f
(
"foo"
) >
10
function
foo
(
f
) {
return
f
(
24
); }
foo
(
function
(
x
) {
return
x; });