- Java
- JavaScript
- Swift
-record(error, { code=[] :: [] | binary() }).
-record(ok, { code=[] :: [] | binary() }).
-record(io, { code=[] :: [] | #ok{} | #error{},
data=[] :: [] | <<>> | { atom(), binary() | integer() } }).
class Err {
var code: AnyObject?
}
class Ok {
var code: AnyObject?
}
class Io {
var code: AnyObject?
var data: AnyObject?
}
Chain(types: [
Model(value:Tuple(name: "io", body: [
Model(value:Chain(types: [
Model(value: Tuple(name:"ok", body: [
Model(value:Atom())])),
Model(value: Tuple(name:"error", body: [
Model(value:Atom())]))])),
Model(value:Tuple(name:"", body:[
Model(value:Atom()),
Model(value:Chain(types: [
Model(value:Binary()),
Model(value:Number())]))]))])) ])
$ rebar compile
- Anton Makarov
- Viacheslav Katsuba
- Maxim Sokhatsky
OM A HUM