Initial commit

This commit is contained in:
Hugo Mårdbrink 2025-11-30 15:44:22 +01:00
commit a6272848f9
379 changed files with 74829 additions and 0 deletions

View file

@ -0,0 +1,17 @@
/**
* Takes a single argument and always returns its input value.
*/
export function identity(x) {
return x;
}
/**
* Takes an argument and a single function, calls that function with that
* argument and returns that argument instead of the function return value.
*
* Useful for running synchronous side effects in a pipeline.
*/
export function tap(arg, effect) {
effect(arg);
return arg;
}