UNPKG

@progress/kendo-vue-inputs

Version:
35 lines (34 loc) 1.08 kB
/** * @license *------------------------------------------------------------------------------------------- * Copyright © 2025 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the package root for more information *------------------------------------------------------------------------------------------- */ var n = /* @__PURE__ */ ((r) => (r[r.Literal = 0] = "Literal", r[r.Mask = 1] = "Mask", r[r.Undefined = 2] = "Undefined", r))(n || {}); class a { constructor(t, i, s = 2) { this.value = t, this.rest = i, this.type = s; } // map :: Functor f => f a ~> (a -> b) -> f b map(t) { return new a(t(this.value), this.rest); } // chain :: Chain m => m a ~> (a -> m b) -> m b chain(t) { return t(this.value, this.rest); } fold(t) { return t(this.value, this.rest); } concat(t) { return this.map((i, s) => t.chain((e, h) => i.concat([e]))); } toString() { return `Result({ value: '${this.value}', rest: ${this.rest} })`; } } export { a as Result, n as ResultType };