@plylang/prelude 0.0.0-stage → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/README.md +1818 -2
  2. package/dist/Alt.d.ply +16 -0
  3. package/dist/Alt.js +2 -0
  4. package/dist/Alternative.d.ply +13 -0
  5. package/dist/Alternative.js +16 -0
  6. package/dist/Applicative.d.ply +23 -0
  7. package/dist/Applicative.js +18 -0
  8. package/dist/Apply.d.ply +31 -0
  9. package/dist/Apply.js +37 -0
  10. package/dist/Bifunctor.d.ply +12 -0
  11. package/dist/Bifunctor.js +13 -0
  12. package/dist/Chain.d.ply +22 -0
  13. package/dist/Chain.js +9 -0
  14. package/dist/Composition.d.ply +16 -0
  15. package/dist/Composition.js +38 -0
  16. package/dist/Filterable.d.ply +28 -0
  17. package/dist/Filterable.js +14 -0
  18. package/dist/Foldable.d.ply +63 -0
  19. package/dist/Foldable.js +238 -0
  20. package/dist/Fractional.d.ply +31 -0
  21. package/dist/Fractional.js +11 -0
  22. package/dist/Functor.d.ply +17 -0
  23. package/dist/Functor.js +12 -0
  24. package/dist/Group.d.ply +10 -0
  25. package/dist/Logical.d.ply +37 -0
  26. package/dist/Logical.js +20 -0
  27. package/dist/Monad.d.ply +10 -0
  28. package/dist/Monoid.d.ply +32 -0
  29. package/dist/Monoid.js +21 -0
  30. package/dist/Number.d.ply +56 -0
  31. package/dist/Number.js +90 -0
  32. package/dist/Ord.d.ply +67 -0
  33. package/dist/Ord.js +106 -0
  34. package/dist/Plus.d.ply +16 -0
  35. package/dist/Plus.js +13 -0
  36. package/dist/Prelude.d.ply +51 -0
  37. package/dist/Prelude.js +17 -0
  38. package/dist/Remainder.d.ply +33 -0
  39. package/dist/Remainder.js +26 -0
  40. package/dist/Semigroup.d.ply +30 -0
  41. package/dist/Semigroup.js +19 -0
  42. package/dist/Setoid.d.ply +45 -0
  43. package/dist/Setoid.js +25 -0
  44. package/dist/Show.d.ply +45 -0
  45. package/dist/Show.js +34 -0
  46. package/dist/Traversable.d.ply +33 -0
  47. package/dist/Traversable.js +136 -0
  48. package/dist/Types.d.ply +39 -0
  49. package/dist/Types.js +8 -0
  50. package/foreign/Alt.js +3 -0
  51. package/foreign/Applicative.js +3 -0
  52. package/foreign/Apply.js +9 -0
  53. package/foreign/Chain.js +9 -0
  54. package/foreign/Filterable.js +13 -0
  55. package/foreign/Foldable.js +29 -0
  56. package/foreign/Fractional.js +23 -0
  57. package/foreign/Functor.js +3 -0
  58. package/foreign/Logical.js +11 -0
  59. package/foreign/Number.js +23 -0
  60. package/foreign/Ord.js +34 -0
  61. package/foreign/Remainder.js +32 -0
  62. package/foreign/Semigroup.js +7 -0
  63. package/foreign/Setoid.js +24 -0
  64. package/foreign/Show.js +20 -0
  65. package/foreign/Traversable.js +3 -0
  66. package/foreign/Types.js +52 -0
  67. package/package.json +131 -4
package/README.md CHANGED
@@ -1,3 +1,1819 @@
1
- # Temporary Holding Version
1
+ # @plylang/prelude
2
+
3
+ - [@plylang/prelude/Alt](#plylangpreludealt)
4
+ - [@plylang/prelude/Alternative](#plylangpreludealternative)
5
+ - [@plylang/prelude/Applicative](#plylangpreludeapplicative)
6
+ - [@plylang/prelude/Apply](#plylangpreludeapply)
7
+ - [@plylang/prelude/Bifunctor](#plylangpreludebifunctor)
8
+ - [@plylang/prelude/Chain](#plylangpreludechain)
9
+ - [@plylang/prelude/Composition](#plylangpreludecomposition)
10
+ - [@plylang/prelude/Filterable](#plylangpreludefilterable)
11
+ - [@plylang/prelude/Foldable](#plylangpreludefoldable)
12
+ - [@plylang/prelude/Fractional](#plylangpreludefractional)
13
+ - [@plylang/prelude/Functor](#plylangpreludefunctor)
14
+ - [@plylang/prelude/Group](#plylangpreludegroup)
15
+ - [@plylang/prelude/Logical](#plylangpreludelogical)
16
+ - [@plylang/prelude/Monad](#plylangpreludemonad)
17
+ - [@plylang/prelude/Monoid](#plylangpreludemonoid)
18
+ - [@plylang/prelude/Number](#plylangpreludenumber)
19
+ - [@plylang/prelude/Ord](#plylangpreludeord)
20
+ - [@plylang/prelude/Plus](#plylangpreludeplus)
21
+ - [@plylang/prelude/Prelude](#plylangpreludeprelude)
22
+ - [@plylang/prelude/Remainder](#plylangpreluderemainder)
23
+ - [@plylang/prelude/Semigroup](#plylangpreludesemigroup)
24
+ - [@plylang/prelude/Setoid](#plylangpreludesetoid)
25
+ - [@plylang/prelude/Show](#plylangpreludeshow)
26
+ - [@plylang/prelude/Traversable](#plylangpreludetraversable)
27
+ - [@plylang/prelude/Types](#plylangpreludetypes)
28
+
29
+ ## @plylang/prelude/Alt
30
+
31
+ ### Classes
32
+
33
+ #### Alt
34
+
35
+ ```ply
36
+ & Functor f => Alt f
37
+ ```
38
+
39
+ Keep the lower value when it is a result, otherwise the upper one.
40
+ An array keeps both, lower first.
41
+
42
+ #### alt
43
+
44
+ ```ply
45
+ alt ( Alt f => (f a) (f a) -- (f a) )
46
+ ```
47
+
48
+ The lower value when it is a result, otherwise the upper one.
49
+
50
+ ### Instances
51
+
52
+ - Alt Array
53
+
54
+ ## @plylang/prelude/Alternative
55
+
56
+ ### Classes
57
+
58
+ #### Alternative
59
+
60
+ ```ply
61
+ & Applicative f, Plus f => Alternative f
62
+ ```
63
+
64
+ One constraint brings of, alt, and zero.
65
+
66
+ ### Words
67
+
68
+ #### guard
69
+
70
+ ```ply
71
+ : guard ( Alternative f => Bool -- (f Unit) )
72
+ ```
73
+
74
+ true is of Unit. false is zero.
75
+
76
+ ## @plylang/prelude/Applicative
77
+
78
+ ### Classes
79
+
80
+ #### Applicative
81
+
82
+ ```ply
83
+ & Apply f => Applicative f
84
+ ```
85
+
86
+ Put one value into the container.
87
+
88
+ #### of
89
+
90
+ ```ply
91
+ of ( Applicative f => a -- (f a) )
92
+ ```
93
+
94
+ The container of this one value.
95
+
96
+ ### Instances
97
+
98
+ - Applicative Array
99
+
100
+ ### Words
101
+
102
+ #### append
103
+
104
+ ```ply
105
+ : append ( Applicative f => Semigroup (f a) => (f a) a -- (f a) )
106
+ ```
107
+
108
+ The container with this value joined after it.
109
+
110
+ #### prepend
111
+
112
+ ```ply
113
+ : prepend ( Applicative f => Semigroup (f a) => (f a) a -- (f a) )
114
+ ```
115
+
116
+ The container with this value joined before it.
117
+
118
+ ## @plylang/prelude/Apply
119
+
120
+ ### Classes
121
+
122
+ #### Apply
123
+
124
+ ```ply
125
+ & Functor f => Apply f
126
+ ```
127
+
128
+ Apply a container of quotations. The quotations are on top.
129
+
130
+ #### ap
131
+
132
+ ```ply
133
+ ap ( Apply f => (f a) (f (a -- b)) -- (f b) )
134
+ ```
135
+
136
+ Each value run with the quotation beside it. The quotations are on top.
137
+
138
+ ### Instances
139
+
140
+ - Apply Array
141
+
142
+ ### Words
143
+
144
+ #### lift2
145
+
146
+ ```ply
147
+ : lift2 ( Apply f => (f a) (f b) (a b -- c) -- (f c) )
148
+ ```
149
+
150
+ Pass two container values, from the bottom upward, to one quotation.
151
+ map takes the lower value. ap takes the upper one. The quotation stays uncurried.
152
+
153
+ #### lift3
154
+
155
+ ```ply
156
+ : lift3 ( Apply f => (f a) (f b) (f c) (a b c -- d) -- (f d) )
157
+ ```
158
+
159
+ Pass three container values, from the bottom upward, to one quotation.
160
+ map takes the first value. ap takes the other two. The quotation stays uncurried.
161
+
162
+ #### apFirst
163
+
164
+ ```ply
165
+ : apFirst ( Apply f => (f a) (f b) -- (f a) )
166
+ ```
167
+
168
+ Keep the lower container's value. The upper container still runs.
169
+
170
+ #### apSecond
171
+
172
+ ```ply
173
+ : apSecond ( Apply f => (f a) (f b) -- (f b) )
174
+ ```
175
+
176
+ Keep the upper container's value. The lower container still runs.
177
+
178
+ ## @plylang/prelude/Bifunctor
179
+
180
+ ### Classes
181
+
182
+ #### Bifunctor
183
+
184
+ ```ply
185
+ & Bifunctor f
186
+ ```
187
+
188
+ Map both parameters. The left quotation is under the right one.
189
+
190
+ #### bimap
191
+
192
+ ```ply
193
+ bimap ( Bifunctor f => (f a c) (a -- b) (c -- d) -- (f b d) )
194
+ ```
195
+
196
+ Left quotation under the right one.
197
+
198
+ ### Words
199
+
200
+ #### mapLeft
201
+
202
+ ```ply
203
+ : mapLeft ( Bifunctor f => (f a c) (a -- b) -- (f b c) )
204
+ ```
205
+
206
+ #### mapRight
207
+
208
+ ```ply
209
+ : mapRight ( Bifunctor f => (f a c) (c -- b) -- (f a b) )
210
+ ```
211
+
212
+ ## @plylang/prelude/Chain
213
+
214
+ ### Classes
215
+
216
+ #### Chain
217
+
218
+ ```ply
219
+ & Apply f => Chain f
220
+ ```
221
+
222
+ Apply a quotation that returns a container, and join the results. The quotation is on top.
223
+
224
+ #### chain
225
+
226
+ ```ply
227
+ chain ( Chain f => (f a) (a -- (f b)) -- (f b) )
228
+ ```
229
+
230
+ The containers the quotation returns, joined into one.
231
+
232
+ ### Instances
233
+
234
+ - Chain Array
235
+
236
+ ### Words
237
+
238
+ #### join
239
+
240
+ ```ply
241
+ : join ( Chain f => (f (f a)) -- (f a) )
242
+ ```
243
+
244
+ One layer removed. The inner container is the result.
245
+
246
+ ## @plylang/prelude/Composition
247
+
248
+ ### Words
249
+
250
+ #### compose
251
+
252
+ ```ply
253
+ : compose ( (a -- b) (b -- c) -- (a -- c) )
254
+ ```
255
+
256
+ Runs the lower quotation first and the upper one second.
257
+ A function type cannot be an instance head, so composition is a pair of words.
258
+
259
+ #### id
260
+
261
+ ```ply
262
+ : id ( -- (a -- a) )
263
+ ```
264
+
265
+ A quotation that returns its input.
266
+
267
+ #### curry2
268
+
269
+ ```ply
270
+ : curry2 ( (a b -- c) -- (a -- (b -- c)) )
271
+ ```
272
+
273
+ Split a binary quotation into unary steps, so ap can take one value at a time.
274
+
275
+ #### curry3
276
+
277
+ ```ply
278
+ : curry3 ( (a b c -- d) -- (a -- (b -- (c -- d))) )
279
+ ```
280
+
281
+ Split a ternary quotation into unary steps, so ap can take one value at a time.
282
+
283
+ ## @plylang/prelude/Filterable
284
+
285
+ ### Classes
286
+
287
+ #### Filterable
288
+
289
+ ```ply
290
+ & Filterable f
291
+ ```
292
+
293
+ filter keeps values the quotation accepts.
294
+ partition leaves the matches below and the rest on top.
295
+ filterMap keeps Some. partitionMap leaves Right below and Left on top.
296
+
297
+ #### filter
298
+
299
+ ```ply
300
+ filter ( Filterable f => (f a) (a -- Bool) -- (f a) )
301
+ ```
302
+
303
+ Values the quotation accepts.
304
+
305
+ #### partition
306
+
307
+ ```ply
308
+ partition ( Filterable f => (f a) (a -- Bool) -- (f a) (f a) )
309
+ ```
310
+
311
+ Matches below, the rest on top.
312
+
313
+ ### Instances
314
+
315
+ - Filterable Array
316
+
317
+ ### Words
318
+
319
+ #### reject
320
+
321
+ ```ply
322
+ : reject ( Filterable f => (f a) (a -- Bool) -- (f a) )
323
+ ```
324
+
325
+ ## @plylang/prelude/Foldable
326
+
327
+ ### Classes
328
+
329
+ #### Foldable
330
+
331
+ ```ply
332
+ & Foldable f
333
+ ```
334
+
335
+ fold walks from the left. The initial value sits under the quotation.
336
+ size, all, any, none, elem, intercalate, foldMap and reverse are in Words/Fold.
337
+ sort and sortBy are in Words/Sort.
338
+ size counts with Num. Importing Num here cycles through Option.
339
+
340
+ #### fold
341
+
342
+ ```ply
343
+ fold ( Foldable f => (f a) b (b a -- b) -- b )
344
+ ```
345
+
346
+ Walk from the left. The initial value sits under the quotation.
347
+
348
+ ### Instances
349
+
350
+ - Foldable Array
351
+
352
+ ### Words
353
+
354
+ #### size
355
+
356
+ ```ply
357
+ : size ( Foldable f => (f a) -- Num )
358
+ ```
359
+
360
+ How many elements. An empty structure is 0.
361
+
362
+ #### all
363
+
364
+ ```ply
365
+ : all ( Foldable f => (f a) (a -- Bool) -- Bool )
366
+ ```
367
+
368
+ True when every element suits the quotation. An empty structure is true.
369
+
370
+ #### any
371
+
372
+ ```ply
373
+ : any ( Foldable f => (f a) (a -- Bool) -- Bool )
374
+ ```
375
+
376
+ True when one element suits the quotation. An empty structure is false.
377
+
378
+ #### none
379
+
380
+ ```ply
381
+ : none ( Foldable f => (f a) (a -- Bool) -- Bool )
382
+ ```
383
+
384
+ True when no element suits the quotation. An empty structure is true.
385
+
386
+ #### elem
387
+
388
+ ```ply
389
+ : elem ( Setoid a => Foldable f => (f a) a -- Bool )
390
+ ```
391
+
392
+ True when the upper value equals some element.
393
+
394
+ #### intercalate
395
+
396
+ ```ply
397
+ : intercalate ( Monoid m => Foldable f => (f m) m -- m )
398
+ ```
399
+
400
+ The pieces joined, with the separator between them. An empty structure is empty.
401
+
402
+ #### foldMap
403
+
404
+ ```ply
405
+ : foldMap ( Monoid m => Foldable f => (f a) (a -- m) -- m )
406
+ ```
407
+
408
+ Concat each result, starting from empty.
409
+
410
+ #### reverse
411
+
412
+ ```ply
413
+ : reverse ( Applicative f => Foldable f => Monoid (f a) => (f a) -- (f a) )
414
+ ```
415
+
416
+ The elements in the opposite order.
417
+
418
+ #### sortBy
419
+
420
+ ```ply
421
+ : sortBy ( Ord b => Applicative f => Foldable f => Monoid (f a) => (f a) (a -- b) -- (f a) )
422
+ ```
423
+
424
+ The elements ordered by the quotation, using lte on each result.
425
+ An equal result keeps the earlier element.
426
+
427
+ #### sort
428
+
429
+ ```ply
430
+ : sort ( Ord a => Applicative f => Foldable f => Monoid (f a) => (f a) -- (f a) )
431
+ ```
432
+
433
+ The elements ordered by lte. An equal element keeps the earlier place.
434
+
435
+ ## @plylang/prelude/Fractional
436
+
437
+ ### Classes
438
+
439
+ #### Fractional
440
+
441
+ ```ply
442
+ & Number a => Fractional a
443
+ ```
444
+
445
+ #### fdiv
446
+
447
+ ```ply
448
+ fdiv ( Fractional a => a a -- a )
449
+ ```
450
+
451
+ #### floor
452
+
453
+ ```ply
454
+ floor ( Fractional a => a -- a )
455
+ ```
456
+
457
+ #### ceil
458
+
459
+ ```ply
460
+ ceil ( Fractional a => a -- a )
461
+ ```
462
+
463
+ #### round
464
+
465
+ ```ply
466
+ round ( Fractional a => a -- a )
467
+ ```
468
+
469
+ #### trunc
470
+
471
+ ```ply
472
+ trunc ( Fractional a => a -- a )
473
+ ```
474
+
475
+ ### Instances
476
+
477
+ - Fractional Num
478
+
479
+ ### Words
480
+
481
+ #### recip
482
+
483
+ ```ply
484
+ : recip ( Fractional a => a -- a )
485
+ ```
486
+
487
+ ## @plylang/prelude/Functor
488
+
489
+ ### Classes
490
+
491
+ #### Functor
492
+
493
+ ```ply
494
+ & Functor f
495
+ ```
496
+
497
+ Apply a quotation inside the container. The quotation is on top.
498
+
499
+ #### map
500
+
501
+ ```ply
502
+ map ( Functor f => (f a) (a -- b) -- (f b) )
503
+ ```
504
+
505
+ The container of results. The quotation is on top.
506
+
507
+ ### Instances
508
+
509
+ - Functor Array
510
+
511
+ ### Words
512
+
513
+ #### flip
514
+
515
+ ```ply
516
+ : flip ( Functor f => a (f (a -- b)) -- (f b) )
517
+ ```
518
+
519
+ ## @plylang/prelude/Group
520
+
521
+ ### Classes
522
+
523
+ #### Group
524
+
525
+ ```ply
526
+ & Monoid g => Group g
527
+ ```
528
+
529
+ A monoid whose concat has an inverse. No prelude type is an instance.
530
+
531
+ #### invert
532
+
533
+ ```ply
534
+ invert ( Group g => g -- g )
535
+ ```
536
+
537
+ The value that concats back to empty.
538
+
539
+ ## @plylang/prelude/Logical
540
+
541
+ ### Classes
542
+
543
+ #### Logical
544
+
545
+ ```ply
546
+ & Logical a
547
+ ```
548
+
549
+ Conjunction, disjunction, negation, and implication.
550
+ truth and falsity are the constants, because true and false are keywords.
551
+
552
+ #### and
553
+
554
+ ```ply
555
+ and ( Logical a => a a -- a )
556
+ ```
557
+
558
+ Conjunction.
559
+
560
+ #### or
561
+
562
+ ```ply
563
+ or ( Logical a => a a -- a )
564
+ ```
565
+
566
+ Disjunction.
567
+
568
+ #### not
569
+
570
+ ```ply
571
+ not ( Logical a => a -- a )
572
+ ```
573
+
574
+ The opposite value.
575
+
576
+ #### truth
577
+
578
+ ```ply
579
+ truth ( Logical a => -- a )
580
+ ```
581
+
582
+ The constant that and leaves unchanged.
583
+
584
+ #### falsity
585
+
586
+ ```ply
587
+ falsity ( Logical a => -- a )
588
+ ```
589
+
590
+ The constant that or leaves unchanged.
591
+
592
+ ### Instances
593
+
594
+ - Logical Bool
595
+
596
+ ### Words
597
+
598
+ #### implies
599
+
600
+ ```ply
601
+ : implies ( Logical a => a a -- a )
602
+ ```
603
+
604
+ The lower value implies the upper one.
605
+
606
+ ## @plylang/prelude/Monad
607
+
608
+ ### Classes
609
+
610
+ #### Monad
611
+
612
+ ```ply
613
+ & Applicative m, Chain m => Monad m
614
+ ```
615
+
616
+ One constraint brings both of and chain.
617
+
618
+ ## @plylang/prelude/Monoid
619
+
620
+ ### Classes
621
+
622
+ #### Monoid
623
+
624
+ ```ply
625
+ & Semigroup a => Monoid a
626
+ ```
627
+
628
+ The empty value of a semigroup. Concat with empty changes nothing.
629
+
630
+ #### empty
631
+
632
+ ```ply
633
+ empty ( Monoid a => -- a )
634
+ ```
635
+
636
+ The value concat leaves unchanged.
637
+
638
+ ### Instances
639
+
640
+ - Monoid Str
641
+ - Monoid Unit
642
+ - Monoid (Array a)
643
+ - Monoid Ordering
644
+
645
+ ## @plylang/prelude/Number
646
+
647
+ ### Classes
648
+
649
+ #### Number
650
+
651
+ ```ply
652
+ & Number a
653
+ ```
654
+
655
+ #### add
656
+
657
+ ```ply
658
+ add ( Number a => a a -- a )
659
+ ```
660
+
661
+ #### sub
662
+
663
+ ```ply
664
+ sub ( Number a => a a -- a )
665
+ ```
666
+
667
+ #### mul
668
+
669
+ ```ply
670
+ mul ( Number a => a a -- a )
671
+ ```
672
+
673
+ #### zero
674
+
675
+ ```ply
676
+ zero ( Number a => -- a )
677
+ ```
678
+
679
+ #### one
680
+
681
+ ```ply
682
+ one ( Number a => -- a )
683
+ ```
684
+
685
+ ### Instances
686
+
687
+ - Number Int
688
+ - Number Num
689
+
690
+ ### Words
691
+
692
+ #### inc
693
+
694
+ ```ply
695
+ : inc ( Number a => a -- a )
696
+ ```
697
+
698
+ #### dec
699
+
700
+ ```ply
701
+ : dec ( Number a => a -- a )
702
+ ```
703
+
704
+ #### negate
705
+
706
+ ```ply
707
+ : negate ( Number a => a -- a )
708
+ ```
709
+
710
+ #### sign
711
+
712
+ ```ply
713
+ : sign ( Number a => Ord a => a -- a )
714
+ ```
715
+
716
+ #### abs
717
+
718
+ ```ply
719
+ : abs ( Number a => Ord a => a -- a )
720
+ ```
721
+
722
+ ## @plylang/prelude/Ord
723
+
724
+ ### Classes
725
+
726
+ #### Ord
727
+
728
+ ```ply
729
+ & Setoid a => Ord a
730
+ ```
731
+
732
+ A total order. The lower value is compared with the upper one.
733
+
734
+ #### lte
735
+
736
+ ```ply
737
+ lte ( Ord a => a a -- Bool )
738
+ ```
739
+
740
+ True when the lower value is below the upper one, or they match.
741
+
742
+ ### Instances
743
+
744
+ - Ord Str
745
+ - Ord Num
746
+ - Ord Int
747
+ - Ord Bool
748
+ - Ord Unit
749
+ - Ord (Array a)
750
+ - Ord Ordering
751
+
752
+ ### Words
753
+
754
+ #### lt
755
+
756
+ ```ply
757
+ : lt ( Ord a => a a -- Bool )
758
+ ```
759
+
760
+ True when the lower value is below the upper one.
761
+
762
+ #### gt
763
+
764
+ ```ply
765
+ : gt ( Ord a => a a -- Bool )
766
+ ```
767
+
768
+ True when the lower value is above the upper one.
769
+
770
+ #### gte
771
+
772
+ ```ply
773
+ : gte ( Ord a => a a -- Bool )
774
+ ```
775
+
776
+ True when the lower value is above the upper one, or they match.
777
+
778
+ #### min
779
+
780
+ ```ply
781
+ : min ( Ord a => a a -- a )
782
+ ```
783
+
784
+ The smaller value. The lower one stays when they match.
785
+
786
+ #### max
787
+
788
+ ```ply
789
+ : max ( Ord a => a a -- a )
790
+ ```
791
+
792
+ The larger value. The upper one stays when they match.
793
+
794
+ #### clamp
795
+
796
+ ```ply
797
+ : clamp ( Ord a => a a a -- a )
798
+ ```
799
+
800
+ Lower bound, upper bound, then the value. A value outside the bounds becomes the nearer bound.
801
+
802
+ #### compare
803
+
804
+ ```ply
805
+ : compare ( Ord a => a a -- Ordering )
806
+ ```
807
+
808
+ ## @plylang/prelude/Plus
809
+
810
+ ### Classes
811
+
812
+ #### Plus
813
+
814
+ ```ply
815
+ & Alt f => Plus f
816
+ ```
817
+
818
+ The value that loses to every other one. alt with it changes nothing.
819
+
820
+ #### init
821
+
822
+ ```ply
823
+ init ( Plus f => -- (f a) )
824
+ ```
825
+
826
+ The value that loses. alt with it changes nothing.
827
+
828
+ ### Words
829
+
830
+ #### oneOf
831
+
832
+ ```ply
833
+ : oneOf ( Foldable t => Plus f => (t (f a)) -- (f a) )
834
+ ```
835
+
836
+ Folds with alt, starting from init.
837
+ Maybe keeps the first Just. Array appends every piece, lower first.
838
+
839
+ ## @plylang/prelude/Prelude
840
+
841
+ ### Types
842
+
843
+ #### Ordering
844
+
845
+ ```ply
846
+ ; Ordering = LT | EQ | GT
847
+ ```
848
+
849
+ LT is below EQ. EQ is below GT.
850
+
851
+ ### Classes
852
+
853
+ #### Alt
854
+
855
+ ```ply
856
+ & Functor f => Alt f
857
+ ```
858
+
859
+ Keep the lower value when it is a result, otherwise the upper one.
860
+ An array keeps both, lower first.
861
+
862
+ #### alt
863
+
864
+ ```ply
865
+ alt ( Alt f => (f a) (f a) -- (f a) )
866
+ ```
867
+
868
+ The lower value when it is a result, otherwise the upper one.
869
+
870
+ #### Alternative
871
+
872
+ ```ply
873
+ & Applicative f, Plus f => Alternative f
874
+ ```
875
+
876
+ One constraint brings of, alt, and zero.
877
+
878
+ #### Applicative
879
+
880
+ ```ply
881
+ & Apply f => Applicative f
882
+ ```
883
+
884
+ Put one value into the container.
885
+
886
+ #### of
887
+
888
+ ```ply
889
+ of ( Applicative f => a -- (f a) )
890
+ ```
891
+
892
+ The container of this one value.
893
+
894
+ #### Apply
895
+
896
+ ```ply
897
+ & Functor f => Apply f
898
+ ```
899
+
900
+ Apply a container of quotations. The quotations are on top.
901
+
902
+ #### ap
903
+
904
+ ```ply
905
+ ap ( Apply f => (f a) (f (a -- b)) -- (f b) )
906
+ ```
907
+
908
+ Each value run with the quotation beside it. The quotations are on top.
909
+
910
+ #### Bifunctor
911
+
912
+ ```ply
913
+ & Bifunctor f
914
+ ```
915
+
916
+ Map both parameters. The left quotation is under the right one.
917
+
918
+ #### bimap
919
+
920
+ ```ply
921
+ bimap ( Bifunctor f => (f a c) (a -- b) (c -- d) -- (f b d) )
922
+ ```
923
+
924
+ Left quotation under the right one.
925
+
926
+ #### Chain
927
+
928
+ ```ply
929
+ & Apply f => Chain f
930
+ ```
931
+
932
+ Apply a quotation that returns a container, and join the results. The quotation is on top.
933
+
934
+ #### chain
935
+
936
+ ```ply
937
+ chain ( Chain f => (f a) (a -- (f b)) -- (f b) )
938
+ ```
939
+
940
+ The containers the quotation returns, joined into one.
941
+
942
+ #### Filterable
943
+
944
+ ```ply
945
+ & Filterable f
946
+ ```
947
+
948
+ filter keeps values the quotation accepts.
949
+ partition leaves the matches below and the rest on top.
950
+ filterMap keeps Some. partitionMap leaves Right below and Left on top.
951
+
952
+ #### filter
953
+
954
+ ```ply
955
+ filter ( Filterable f => (f a) (a -- Bool) -- (f a) )
956
+ ```
957
+
958
+ Values the quotation accepts.
959
+
960
+ #### partition
961
+
962
+ ```ply
963
+ partition ( Filterable f => (f a) (a -- Bool) -- (f a) (f a) )
964
+ ```
965
+
966
+ Matches below, the rest on top.
967
+
968
+ #### Foldable
969
+
970
+ ```ply
971
+ & Foldable f
972
+ ```
973
+
974
+ fold walks from the left. The initial value sits under the quotation.
975
+ size, all, any, none, elem, intercalate, foldMap and reverse are in Words/Fold.
976
+ sort and sortBy are in Words/Sort.
977
+ size counts with Num. Importing Num here cycles through Option.
978
+
979
+ #### fold
980
+
981
+ ```ply
982
+ fold ( Foldable f => (f a) b (b a -- b) -- b )
983
+ ```
984
+
985
+ Walk from the left. The initial value sits under the quotation.
986
+
987
+ #### Fractional
988
+
989
+ ```ply
990
+ & Number a => Fractional a
991
+ ```
992
+
993
+ #### fdiv
994
+
995
+ ```ply
996
+ fdiv ( Fractional a => a a -- a )
997
+ ```
998
+
999
+ #### floor
1000
+
1001
+ ```ply
1002
+ floor ( Fractional a => a -- a )
1003
+ ```
1004
+
1005
+ #### ceil
1006
+
1007
+ ```ply
1008
+ ceil ( Fractional a => a -- a )
1009
+ ```
1010
+
1011
+ #### round
1012
+
1013
+ ```ply
1014
+ round ( Fractional a => a -- a )
1015
+ ```
1016
+
1017
+ #### trunc
1018
+
1019
+ ```ply
1020
+ trunc ( Fractional a => a -- a )
1021
+ ```
1022
+
1023
+ #### Functor
1024
+
1025
+ ```ply
1026
+ & Functor f
1027
+ ```
1028
+
1029
+ Apply a quotation inside the container. The quotation is on top.
1030
+
1031
+ #### map
1032
+
1033
+ ```ply
1034
+ map ( Functor f => (f a) (a -- b) -- (f b) )
1035
+ ```
1036
+
1037
+ The container of results. The quotation is on top.
1038
+
1039
+ #### Group
1040
+
1041
+ ```ply
1042
+ & Monoid g => Group g
1043
+ ```
1044
+
1045
+ A monoid whose concat has an inverse. No prelude type is an instance.
1046
+
1047
+ #### invert
1048
+
1049
+ ```ply
1050
+ invert ( Group g => g -- g )
1051
+ ```
1052
+
1053
+ The value that concats back to empty.
1054
+
1055
+ #### Logical
1056
+
1057
+ ```ply
1058
+ & Logical a
1059
+ ```
1060
+
1061
+ Conjunction, disjunction, negation, and implication.
1062
+ truth and falsity are the constants, because true and false are keywords.
1063
+
1064
+ #### and
1065
+
1066
+ ```ply
1067
+ and ( Logical a => a a -- a )
1068
+ ```
1069
+
1070
+ Conjunction.
1071
+
1072
+ #### or
1073
+
1074
+ ```ply
1075
+ or ( Logical a => a a -- a )
1076
+ ```
1077
+
1078
+ Disjunction.
1079
+
1080
+ #### not
1081
+
1082
+ ```ply
1083
+ not ( Logical a => a -- a )
1084
+ ```
1085
+
1086
+ The opposite value.
1087
+
1088
+ #### truth
1089
+
1090
+ ```ply
1091
+ truth ( Logical a => -- a )
1092
+ ```
1093
+
1094
+ The constant that and leaves unchanged.
1095
+
1096
+ #### falsity
1097
+
1098
+ ```ply
1099
+ falsity ( Logical a => -- a )
1100
+ ```
1101
+
1102
+ The constant that or leaves unchanged.
1103
+
1104
+ #### Monad
1105
+
1106
+ ```ply
1107
+ & Applicative m, Chain m => Monad m
1108
+ ```
1109
+
1110
+ One constraint brings both of and chain.
1111
+
1112
+ #### Monoid
1113
+
1114
+ ```ply
1115
+ & Semigroup a => Monoid a
1116
+ ```
1117
+
1118
+ The empty value of a semigroup. Concat with empty changes nothing.
1119
+
1120
+ #### empty
1121
+
1122
+ ```ply
1123
+ empty ( Monoid a => -- a )
1124
+ ```
1125
+
1126
+ The value concat leaves unchanged.
1127
+
1128
+ #### Number
1129
+
1130
+ ```ply
1131
+ & Number a
1132
+ ```
1133
+
1134
+ #### add
1135
+
1136
+ ```ply
1137
+ add ( Number a => a a -- a )
1138
+ ```
1139
+
1140
+ #### sub
1141
+
1142
+ ```ply
1143
+ sub ( Number a => a a -- a )
1144
+ ```
1145
+
1146
+ #### mul
1147
+
1148
+ ```ply
1149
+ mul ( Number a => a a -- a )
1150
+ ```
1151
+
1152
+ #### zero
1153
+
1154
+ ```ply
1155
+ zero ( Number a => -- a )
1156
+ ```
1157
+
1158
+ #### one
1159
+
1160
+ ```ply
1161
+ one ( Number a => -- a )
1162
+ ```
1163
+
1164
+ #### Ord
1165
+
1166
+ ```ply
1167
+ & Setoid a => Ord a
1168
+ ```
1169
+
1170
+ A total order. The lower value is compared with the upper one.
1171
+
1172
+ #### lte
1173
+
1174
+ ```ply
1175
+ lte ( Ord a => a a -- Bool )
1176
+ ```
1177
+
1178
+ True when the lower value is below the upper one, or they match.
1179
+
1180
+ #### Plus
1181
+
1182
+ ```ply
1183
+ & Alt f => Plus f
1184
+ ```
1185
+
1186
+ The value that loses to every other one. alt with it changes nothing.
1187
+
1188
+ #### init
1189
+
1190
+ ```ply
1191
+ init ( Plus f => -- (f a) )
1192
+ ```
1193
+
1194
+ The value that loses. alt with it changes nothing.
1195
+
1196
+ #### Remainder
1197
+
1198
+ ```ply
1199
+ & Number a => Remainder a
1200
+ ```
1201
+
1202
+ #### quotRem
1203
+
1204
+ ```ply
1205
+ quotRem ( Remainder a => a a -- a a )
1206
+ ```
1207
+
1208
+ #### divMod
1209
+
1210
+ ```ply
1211
+ divMod ( Remainder a => a a -- a a )
1212
+ ```
1213
+
1214
+ #### Semigroup
1215
+
1216
+ ```ply
1217
+ & Semigroup a
1218
+ ```
1219
+
1220
+ Join the lower value with the upper one.
1221
+
1222
+ #### concat
1223
+
1224
+ ```ply
1225
+ concat ( Semigroup a => a a -- a )
1226
+ ```
1227
+
1228
+ The lower value joined with the upper one.
1229
+
1230
+ #### Setoid
1231
+
1232
+ ```ply
1233
+ & Setoid a
1234
+ ```
1235
+
1236
+ Decide whether two values are equal.
1237
+
1238
+ #### equal
1239
+
1240
+ ```ply
1241
+ equal ( Setoid a => a a -- Bool )
1242
+ ```
1243
+
1244
+ True when the two values match.
1245
+
1246
+ #### Show
1247
+
1248
+ ```ply
1249
+ & Show a
1250
+ ```
1251
+
1252
+ Render a value as text.
1253
+
1254
+ #### show
1255
+
1256
+ ```ply
1257
+ show ( Show a => a -- Str )
1258
+ ```
1259
+
1260
+ The text of this value.
1261
+
1262
+ #### Traversable
1263
+
1264
+ ```ply
1265
+ & Foldable f, Functor f => Traversable f
1266
+ ```
1267
+
1268
+ Visit each value with a quotation that returns an applicative result, and collect those results in order.
1269
+ Applicative already brings ap and map.
1270
+
1271
+ #### traverse
1272
+
1273
+ ```ply
1274
+ traverse ( Traversable f => Applicative m => (f a) (a -- (m b)) -- (m (f b)) )
1275
+ ```
1276
+
1277
+ Each value visited by a quotation that returns an applicative result. The results stay in order.
1278
+
1279
+ ### Words
1280
+
1281
+ #### guard
1282
+
1283
+ ```ply
1284
+ : guard ( Alternative f => Bool -- (f Unit) )
1285
+ ```
1286
+
1287
+ true is of Unit. false is zero.
1288
+
1289
+ #### append
1290
+
1291
+ ```ply
1292
+ : append ( Applicative f => Semigroup (f a) => (f a) a -- (f a) )
1293
+ ```
1294
+
1295
+ The container with this value joined after it.
1296
+
1297
+ #### prepend
1298
+
1299
+ ```ply
1300
+ : prepend ( Applicative f => Semigroup (f a) => (f a) a -- (f a) )
1301
+ ```
1302
+
1303
+ The container with this value joined before it.
1304
+
1305
+ #### lift2
1306
+
1307
+ ```ply
1308
+ : lift2 ( Apply f => (f a) (f b) (a b -- c) -- (f c) )
1309
+ ```
1310
+
1311
+ Pass two container values, from the bottom upward, to one quotation.
1312
+ map takes the lower value. ap takes the upper one. The quotation stays uncurried.
1313
+
1314
+ #### lift3
1315
+
1316
+ ```ply
1317
+ : lift3 ( Apply f => (f a) (f b) (f c) (a b c -- d) -- (f d) )
1318
+ ```
1319
+
1320
+ Pass three container values, from the bottom upward, to one quotation.
1321
+ map takes the first value. ap takes the other two. The quotation stays uncurried.
1322
+
1323
+ #### apFirst
1324
+
1325
+ ```ply
1326
+ : apFirst ( Apply f => (f a) (f b) -- (f a) )
1327
+ ```
1328
+
1329
+ Keep the lower container's value. The upper container still runs.
1330
+
1331
+ #### apSecond
1332
+
1333
+ ```ply
1334
+ : apSecond ( Apply f => (f a) (f b) -- (f b) )
1335
+ ```
1336
+
1337
+ Keep the upper container's value. The lower container still runs.
1338
+
1339
+ #### mapLeft
1340
+
1341
+ ```ply
1342
+ : mapLeft ( Bifunctor f => (f a c) (a -- b) -- (f b c) )
1343
+ ```
1344
+
1345
+ #### mapRight
1346
+
1347
+ ```ply
1348
+ : mapRight ( Bifunctor f => (f a c) (c -- b) -- (f a b) )
1349
+ ```
1350
+
1351
+ #### join
1352
+
1353
+ ```ply
1354
+ : join ( Chain f => (f (f a)) -- (f a) )
1355
+ ```
1356
+
1357
+ One layer removed. The inner container is the result.
1358
+
1359
+ #### compose
1360
+
1361
+ ```ply
1362
+ : compose ( (a -- b) (b -- c) -- (a -- c) )
1363
+ ```
1364
+
1365
+ Runs the lower quotation first and the upper one second.
1366
+ A function type cannot be an instance head, so composition is a pair of words.
1367
+
1368
+ #### id
1369
+
1370
+ ```ply
1371
+ : id ( -- (a -- a) )
1372
+ ```
1373
+
1374
+ A quotation that returns its input.
1375
+
1376
+ #### curry2
1377
+
1378
+ ```ply
1379
+ : curry2 ( (a b -- c) -- (a -- (b -- c)) )
1380
+ ```
1381
+
1382
+ Split a binary quotation into unary steps, so ap can take one value at a time.
1383
+
1384
+ #### curry3
1385
+
1386
+ ```ply
1387
+ : curry3 ( (a b c -- d) -- (a -- (b -- (c -- d))) )
1388
+ ```
1389
+
1390
+ Split a ternary quotation into unary steps, so ap can take one value at a time.
1391
+
1392
+ #### reject
1393
+
1394
+ ```ply
1395
+ : reject ( Filterable f => (f a) (a -- Bool) -- (f a) )
1396
+ ```
1397
+
1398
+ #### size
1399
+
1400
+ ```ply
1401
+ : size ( Foldable f => (f a) -- Num )
1402
+ ```
1403
+
1404
+ How many elements. An empty structure is 0.
1405
+
1406
+ #### all
1407
+
1408
+ ```ply
1409
+ : all ( Foldable f => (f a) (a -- Bool) -- Bool )
1410
+ ```
1411
+
1412
+ True when every element suits the quotation. An empty structure is true.
1413
+
1414
+ #### any
1415
+
1416
+ ```ply
1417
+ : any ( Foldable f => (f a) (a -- Bool) -- Bool )
1418
+ ```
1419
+
1420
+ True when one element suits the quotation. An empty structure is false.
1421
+
1422
+ #### none
1423
+
1424
+ ```ply
1425
+ : none ( Foldable f => (f a) (a -- Bool) -- Bool )
1426
+ ```
1427
+
1428
+ True when no element suits the quotation. An empty structure is true.
1429
+
1430
+ #### elem
1431
+
1432
+ ```ply
1433
+ : elem ( Setoid a => Foldable f => (f a) a -- Bool )
1434
+ ```
1435
+
1436
+ True when the upper value equals some element.
1437
+
1438
+ #### intercalate
1439
+
1440
+ ```ply
1441
+ : intercalate ( Monoid m => Foldable f => (f m) m -- m )
1442
+ ```
1443
+
1444
+ The pieces joined, with the separator between them. An empty structure is empty.
1445
+
1446
+ #### foldMap
1447
+
1448
+ ```ply
1449
+ : foldMap ( Monoid m => Foldable f => (f a) (a -- m) -- m )
1450
+ ```
1451
+
1452
+ Concat each result, starting from empty.
1453
+
1454
+ #### reverse
1455
+
1456
+ ```ply
1457
+ : reverse ( Applicative f => Foldable f => Monoid (f a) => (f a) -- (f a) )
1458
+ ```
1459
+
1460
+ The elements in the opposite order.
1461
+
1462
+ #### sortBy
1463
+
1464
+ ```ply
1465
+ : sortBy ( Ord b => Applicative f => Foldable f => Monoid (f a) => (f a) (a -- b) -- (f a) )
1466
+ ```
1467
+
1468
+ The elements ordered by the quotation, using lte on each result.
1469
+ An equal result keeps the earlier element.
1470
+
1471
+ #### sort
1472
+
1473
+ ```ply
1474
+ : sort ( Ord a => Applicative f => Foldable f => Monoid (f a) => (f a) -- (f a) )
1475
+ ```
1476
+
1477
+ The elements ordered by lte. An equal element keeps the earlier place.
1478
+
1479
+ #### recip
1480
+
1481
+ ```ply
1482
+ : recip ( Fractional a => a -- a )
1483
+ ```
1484
+
1485
+ #### flip
1486
+
1487
+ ```ply
1488
+ : flip ( Functor f => a (f (a -- b)) -- (f b) )
1489
+ ```
1490
+
1491
+ #### implies
1492
+
1493
+ ```ply
1494
+ : implies ( Logical a => a a -- a )
1495
+ ```
1496
+
1497
+ The lower value implies the upper one.
1498
+
1499
+ #### sign
1500
+
1501
+ ```ply
1502
+ : sign ( Number a => Ord a => a -- a )
1503
+ ```
1504
+
1505
+ #### negate
1506
+
1507
+ ```ply
1508
+ : negate ( Number a => a -- a )
1509
+ ```
1510
+
1511
+ #### abs
1512
+
1513
+ ```ply
1514
+ : abs ( Number a => Ord a => a -- a )
1515
+ ```
1516
+
1517
+ #### inc
1518
+
1519
+ ```ply
1520
+ : inc ( Number a => a -- a )
1521
+ ```
1522
+
1523
+ #### dec
1524
+
1525
+ ```ply
1526
+ : dec ( Number a => a -- a )
1527
+ ```
1528
+
1529
+ #### lt
1530
+
1531
+ ```ply
1532
+ : lt ( Ord a => a a -- Bool )
1533
+ ```
1534
+
1535
+ True when the lower value is below the upper one.
1536
+
1537
+ #### gt
1538
+
1539
+ ```ply
1540
+ : gt ( Ord a => a a -- Bool )
1541
+ ```
1542
+
1543
+ True when the lower value is above the upper one.
1544
+
1545
+ #### gte
1546
+
1547
+ ```ply
1548
+ : gte ( Ord a => a a -- Bool )
1549
+ ```
1550
+
1551
+ True when the lower value is above the upper one, or they match.
1552
+
1553
+ #### min
1554
+
1555
+ ```ply
1556
+ : min ( Ord a => a a -- a )
1557
+ ```
1558
+
1559
+ The smaller value. The lower one stays when they match.
1560
+
1561
+ #### max
1562
+
1563
+ ```ply
1564
+ : max ( Ord a => a a -- a )
1565
+ ```
1566
+
1567
+ The larger value. The upper one stays when they match.
1568
+
1569
+ #### clamp
1570
+
1571
+ ```ply
1572
+ : clamp ( Ord a => a a a -- a )
1573
+ ```
1574
+
1575
+ Lower bound, upper bound, then the value. A value outside the bounds becomes the nearer bound.
1576
+
1577
+ #### compare
1578
+
1579
+ ```ply
1580
+ : compare ( Ord a => a a -- Ordering )
1581
+ ```
1582
+
1583
+ #### oneOf
1584
+
1585
+ ```ply
1586
+ : oneOf ( Foldable t => Plus f => (t (f a)) -- (f a) )
1587
+ ```
1588
+
1589
+ Folds with alt, starting from init.
1590
+ Maybe keeps the first Just. Array appends every piece, lower first.
1591
+
1592
+ #### quot
1593
+
1594
+ ```ply
1595
+ : quot ( Remainder a => a a -- a )
1596
+ ```
1597
+
1598
+ #### rem
1599
+
1600
+ ```ply
1601
+ : rem ( Remainder a => a a -- a )
1602
+ ```
1603
+
1604
+ #### div
1605
+
1606
+ ```ply
1607
+ : div ( Remainder a => a a -- a )
1608
+ ```
1609
+
1610
+ #### mod
1611
+
1612
+ ```ply
1613
+ : mod ( Remainder a => a a -- a )
1614
+ ```
1615
+
1616
+ #### sequence
1617
+
1618
+ ```ply
1619
+ : sequence ( Applicative f => Traversable t => (t (f a)) -- (f (t a)) )
1620
+ ```
1621
+
1622
+ The applicative of the traversable. The inner values stay in order.
1623
+
1624
+ ## @plylang/prelude/Remainder
1625
+
1626
+ ### Classes
1627
+
1628
+ #### Remainder
1629
+
1630
+ ```ply
1631
+ & Number a => Remainder a
1632
+ ```
1633
+
1634
+ #### quotRem
1635
+
1636
+ ```ply
1637
+ quotRem ( Remainder a => a a -- a a )
1638
+ ```
1639
+
1640
+ #### divMod
1641
+
1642
+ ```ply
1643
+ divMod ( Remainder a => a a -- a a )
1644
+ ```
1645
+
1646
+ ### Instances
1647
+
1648
+ - Remainder Int
1649
+ - Remainder Num
1650
+
1651
+ ### Words
1652
+
1653
+ #### quot
1654
+
1655
+ ```ply
1656
+ : quot ( Remainder a => a a -- a )
1657
+ ```
1658
+
1659
+ #### rem
1660
+
1661
+ ```ply
1662
+ : rem ( Remainder a => a a -- a )
1663
+ ```
1664
+
1665
+ #### div
1666
+
1667
+ ```ply
1668
+ : div ( Remainder a => a a -- a )
1669
+ ```
1670
+
1671
+ #### mod
1672
+
1673
+ ```ply
1674
+ : mod ( Remainder a => a a -- a )
1675
+ ```
1676
+
1677
+ ## @plylang/prelude/Semigroup
1678
+
1679
+ ### Classes
1680
+
1681
+ #### Semigroup
1682
+
1683
+ ```ply
1684
+ & Semigroup a
1685
+ ```
1686
+
1687
+ Join the lower value with the upper one.
1688
+
1689
+ #### concat
1690
+
1691
+ ```ply
1692
+ concat ( Semigroup a => a a -- a )
1693
+ ```
1694
+
1695
+ The lower value joined with the upper one.
1696
+
1697
+ ### Instances
1698
+
1699
+ - Semigroup Str
1700
+ - Semigroup Unit
1701
+ - Semigroup (Array a)
1702
+ - Semigroup Ordering
1703
+
1704
+ ## @plylang/prelude/Setoid
1705
+
1706
+ ### Classes
1707
+
1708
+ #### Setoid
1709
+
1710
+ ```ply
1711
+ & Setoid a
1712
+ ```
1713
+
1714
+ Decide whether two values are equal.
1715
+
1716
+ #### equal
1717
+
1718
+ ```ply
1719
+ equal ( Setoid a => a a -- Bool )
1720
+ ```
1721
+
1722
+ True when the two values match.
1723
+
1724
+ ### Instances
1725
+
1726
+ - Setoid Str
1727
+ - Setoid Num
1728
+ - Setoid Int
1729
+ - Setoid Bool
1730
+ - Setoid Unit
1731
+ - Setoid (Array a)
1732
+ - Setoid Ordering
1733
+
1734
+ ## @plylang/prelude/Show
1735
+
1736
+ ### Classes
1737
+
1738
+ #### Show
1739
+
1740
+ ```ply
1741
+ & Show a
1742
+ ```
1743
+
1744
+ Render a value as text.
1745
+
1746
+ #### show
1747
+
1748
+ ```ply
1749
+ show ( Show a => a -- Str )
1750
+ ```
1751
+
1752
+ The text of this value.
1753
+
1754
+ ### Instances
1755
+
1756
+ - Show Str
1757
+ - Show Num
1758
+ - Show Int
1759
+ - Show Bool
1760
+ - Show Unit
1761
+ - Show (Array a)
1762
+ - Show Ordering
1763
+
1764
+ ## @plylang/prelude/Traversable
1765
+
1766
+ ### Classes
1767
+
1768
+ #### Traversable
1769
+
1770
+ ```ply
1771
+ & Foldable f, Functor f => Traversable f
1772
+ ```
1773
+
1774
+ Visit each value with a quotation that returns an applicative result, and collect those results in order.
1775
+ Applicative already brings ap and map.
1776
+
1777
+ #### traverse
1778
+
1779
+ ```ply
1780
+ traverse ( Traversable f => Applicative m => (f a) (a -- (m b)) -- (m (f b)) )
1781
+ ```
1782
+
1783
+ Each value visited by a quotation that returns an applicative result. The results stay in order.
1784
+
1785
+ ### Instances
1786
+
1787
+ - Traversable Array
1788
+
1789
+ ### Words
1790
+
1791
+ #### sequence
1792
+
1793
+ ```ply
1794
+ : sequence ( Applicative f => Traversable t => (t (f a)) -- (f (t a)) )
1795
+ ```
1796
+
1797
+ The applicative of the traversable. The inner values stay in order.
1798
+
1799
+ ## @plylang/prelude/Types
1800
+
1801
+ ### Types
1802
+
1803
+ #### Ordering
1804
+
1805
+ ```ply
1806
+ ; Ordering = LT | EQ | GT
1807
+ ```
1808
+
1809
+ LT is below EQ. EQ is below GT.
1810
+
1811
+ ### Instances
1812
+
1813
+ - Nullary Str
1814
+ - Nullary Num
1815
+ - Nullary Int
1816
+ - Nullary Bool
1817
+ - Nullary Unit
1818
+ - Unary Array
2
1819
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.