replace 'prompt' example by 'environment'

This commit is contained in:
Joeri Exelmans 2025-05-09 14:53:43 +02:00
parent f8008aa25d
commit b1c2e7836d
15 changed files with 317 additions and 517 deletions

View file

@ -7,7 +7,7 @@ export const push = ls => elem => ls.concat([elem]);
export const pop = ls => ls.pop();
export const map = ls => fn => ls.map(elem => fn(elem));
export const length = ls => ls.length;
export const fold = ls => callback => initial => {
export const fold = callback => initial => ls => {
let acc = initial;
for (let i=0; i<ls.length; i++) {
acc = callback(acc)(ls[i]);