const $Sum = $.UnaryType
('Sum')
('http://example.com/my-package#Sum')
([])
(x => type(x) === 'my/sum@1')
(({value}) => [value] )
const $Tuple = $.BinaryType
('Tuple')
('http://example.com/my-package#Tuple')
([])
(x => type(x) === 'my/tuple@1')
( ({fst}) => [fst] )
( ({snd}) => [snd] )
const S = create ({checkTypes: true, env: env.concat( [
$Sum ($.ValidNumber),
$Tuple ($.Unknown) ($.Unknown),
] )})
function Tuple$prototype$concat(that) {
console.log('TUPLE', this, that, type(that), type(that.fst), 'hola', type(that.fst)) //S.concat (this.fst) (that.fst))
return Tuple( S.concat (this.fst) (that.fst) ) (S.concat ( this.snd) (that.snd) )
}