Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
P.chain(name =>
pipe(
S.fold([S.spaces, S.string('::'), S.spaces]),
P.apSecond(type),
P.map(type => ({ name, type }))
)
)
const withParens = <a>(parser: P.Parser): P.Parser => {
return pipe(
leftParens,
P.apSecond(parser),
P.apFirst(rightParens)
)
}
</a>
P.chain(name =>
pipe(
S.spaces,
P.apSecond(
pipe(
types,
P.map(parameters => M.ref(name, parameters))
)
)
)
)
P.chain(domain =>
pipe(
arrow,
P.apSecond(type),
P.map(codomain => M.fun(domain, codomain))
)
)