Closed bbrk24 closed 1 month ago
Input:
f := (x) => switch x [_] // nothing else foo()
Output (with --js to make the len function shorter):
--js
len
function len(arr, length) { return arr.length === length } const f = (x) => { if(Array.isArray(x) && len(x, 1)) {return const [_] = x;} else { return foo() } }
return const isn't a valid type of statement.
return const
Input:
Output (with
--js
to make thelen
function shorter):return const
isn't a valid type of statement.