MCPcopy Create free account
hub / github.com/marijnh/Eloquent-JavaScript / prepend

Function prepend

code/solutions/04_3_a_list.js:17–19  ·  view source on GitHub ↗
(value, list)

Source from the content-addressed store, hash-verified

15}
16
17function prepend(value, list) {
18 return {value, rest: list};
19}
20
21function nth(list, n) {
22 if (!list) return undefined;

Callers 1

04_3_a_list.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected