1// Generated by purs version 0.15.16
2import * as $foreign from "./foreign.js";
3import * as Data_Function from "../Data.Function/index.js";
4import * as Data_Functor from "../Data.Functor/index.js";
5import * as Data_Maybe from "../Data.Maybe/index.js";
6import * as Data_Traversable from "../Data.Traversable/index.js";
7import * as Data_Tuple from "../Data.Tuple/index.js";
8import * as Data_Unfoldable1 from "../Data.Unfoldable1/index.js";
9import * as Data_Unit from "../Data.Unit/index.js";
10var map = /* #__PURE__ */ Data_Functor.map(Data_Maybe.functorMaybe);
11var fromJust = /* #__PURE__ */ Data_Maybe.fromJust();
12var unfoldr = function (dict) {
15var unfoldableMaybe = {
16 unfoldr: function (f) {
18 return map(Data_Tuple.fst)(f(b));
21 Unfoldable10: function () {
22 return Data_Unfoldable1.unfoldable1Maybe;
25var unfoldableArray = {
26 unfoldr: /* #__PURE__ */ $foreign.unfoldrArrayImpl(Data_Maybe.isNothing)(fromJust)(Data_Tuple.fst)(Data_Tuple.snd),
27 Unfoldable10: function () {
28 return Data_Unfoldable1.unfoldable1Array;
31var replicate = function (dictUnfoldable) {
32 var unfoldr1 = unfoldr(dictUnfoldable);
35 var step = function (i) {
38 return Data_Maybe.Nothing.value;
40 return new Data_Maybe.Just(new Data_Tuple.Tuple(v, i - 1 | 0));
42 return unfoldr1(step)(n);
46var replicateA = function (dictApplicative) {
47 return function (dictUnfoldable) {
48 var replicate1 = replicate(dictUnfoldable);
49 return function (dictTraversable) {
50 var sequence = Data_Traversable.sequence(dictTraversable)(dictApplicative);
53 return sequence(replicate1(n)(m));
59var none = function (dictUnfoldable) {
60 return unfoldr(dictUnfoldable)(Data_Function["const"](Data_Maybe.Nothing.value))(Data_Unit.unit);
62var fromMaybe = function (dictUnfoldable) {
63 return unfoldr(dictUnfoldable)(function (b) {
64 return map(Data_Function.flip(Data_Tuple.Tuple.create)(Data_Maybe.Nothing.value))(b);
83} from "../Data.Unfoldable1/index.js";
84//# sourceMappingURL=index.js.map
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list