add chooseIn + chooseOut

This commit is contained in:
Felix Roos
2025-03-21 11:10:06 +01:00
parent c33cfc78c5
commit 12bb82d295
+4
View File
@@ -403,6 +403,10 @@ export const chooseInWith = (pat, xs) => {
*/
export const choose = (...xs) => chooseWith(rand, xs);
// todo: doc
export const chooseIn = (...xs) => chooseInWith(rand, xs);
export const chooseOut = choose;
/**
* Chooses from the given list of values (or patterns of values), according
* to the pattern that the method is called on. The pattern should be in