- Fix package files bug
- Switch to uncurried V11 compiler
- Use Core library
Move lazy sequences to a separate repository. https://github.com/jmagaram/rescript-seq
- Fixed
Seq.filterMap
didn't work with nested optionsSeq.tail
was not completely lazySeq.drop
was not completely lazySeq.findMap
didn't work with nested optionsSeq.replicate
andSeq.replicateWith
argument order was not data-first
- Add
Seq.reduceUntil
to short-circuit a reduce operationSeq.reduceWhile
to short-circuit a reduce operationSeq.split
to reduce adjacent itemsSeq.sumBy
(likeSeq.reduce
but no initial parameter)Seq.prefixSum
(likescan
but does not take an initial parameter)Seq.toList
Seq.tails
Seq.append
as synonym forconcat
Seq.dropLast
Seq.findLast
Seq.findMapLast
Seq.pairAhead
andSeq.pairBehind
Seq.neighbors
NonEmptyArray.of1
,of2
,of3
andofMany
, all zero-cost bindings toArray.of
.- In the test framework, enable displaying detailed messages when a test fails. Provide
Test.fromResult
andTest.fromPredicate
. AlsoexpectThrow
andexpectsNotThrow
. The expectation text is optional.
- Rename
repeat
toreplicate
; more like other Seq librariesInvalidArgument
exception notArgumentOfOfRange
(spelled wrong)Seq.takeAtMost
toSeq.take
Seq.every
notSeq.everyOrEmpty
; less cumbersome and more like arraySeq.everyOk
notSeq.allSome
(usingevery
notforAll
)Seq.everySome
notSeq.allSome
(usingevery
notforAll
)Seq.join
likeArray.join
rather thanSeq.joinString
. Also require a separator character.Seq.headTail
toSeq.uncons
; less cumbersome and used in other libraries.Seq.once
notSeq.singleton
; like Rust. Also provideSeq.onceWith
Array.exactlyOne
notArray.exactlyOneValue
likeSeq.exactlyOne
Array.of1
notArray.fromOneValue
- Remove
Seq.windowAhead
andSeq.windowBehind
; tricky code here. It worked but not sure it is useful enough.windowAhead
would hang if window size was enormous; fixed that before removing it.Seq.findMapi
Seq.fromOption
; not sure this will get usedArray.fromSeed
; use Seq module insteadArray.pairs
; use Seq module insteadArray.filterSomeWith
; use Seq module insteadSeq.characters
; many ways to split a string and with Core it will feel better since you can doString.split
notJs.String2.split
.Seq.startWith
andSeq.endWith
; useconcat
andprepend
withSeq.once
.Seq.scani
; just callindexed
beforehand if index is needed. The mapping within scan removes the index if it isn't desired, unlikefilteri
.Seq.reducei
; just callindexed
beforehand if index is needed. The mapping within reduce removes the index if it isn't desired, unlikefilteri
.
- Other
- Cleanup lots of code
- Fix bug in
Seq.take
where generator function was called 1 too many times; not lazy enough Seq.combinations
Seq.permutations
- Fix bug in
allPairs
where sequences are not cached. Seq.reverse
Seq.sortBy
Seq.delay
- Add
Seq
module
Trampoline
module to eliminate recursion in functionsOption.map5
- Lazy sequences in
Seq
module; will split into separate repository
- Make
Task.t
not abstract Option.map2
,Option.map3
,Option.map4
and test cleanupOption.flatten
Array.filterSome
andArray.filterSomeWith
- For untagged unions
Pattern.MakeOption
- Turn any pattern into at | undefined
Pattern.MakeNullable
- Turn any pattern into at | undefined | null
Pattern.MakeNull
- Turn any pattern into at | null
Pattern.MakeTuple2
andPattern.MakeTuple3
- Option to only show test failures
- Use the built-in
unknown
type - Move
Pattern
to a top-level module, not inside theUnion
module. - Lazy parsing in unions; only do enough until find a match
- Move tests into separate folder and not included in package
- Only includes files needed in package
- Move
TaskResult
into a submodule ofTask
for usability
- Switch to
commonjs
module format; supposedly this works better for Rescript libraries - Examples of using rescript-struct for unions, and compared to using functors in this package.
- Add
TaskResult.mapBoth
- Add
Task.spy
- Fix genType bug with
TaskResult.t
- Rename
match
tomatchABC
so if a convenience function is written to wrap theonA
,onB
, etc. it can use the friendliermatch
word. - More tests to make sure they work and demonstrate how to use them in practice. Include examples with convenience functions so you don't have to remember or pattern match on
A
,B
, andC
. - Add convenience functions to pattern match on a single case, like
toA
andtoB
. - Fix bug in basic int, string, float, etc. patterns that made them unusable because the types were abstract.
- Fix bug where matching input could be anything but should have been just the union type.
- Fix bug in
Unknown.isNullOrUndefined
; only checked for undefined