Call a function: Difference between revisions

Content added Content deleted
Line 2,405: Line 2,405:
<lang langur>write .key, ": ", .value
<lang langur>write .key, ": ", .value
# call built-in with unbounded list</lang>
# call built-in with unbounded list</lang>

<lang langur>val .n = toString random 10
# unbounded lists on toString and random
# later function takes remaining arguments</lang>


<lang langur>val .sum = foldfrom(
<lang langur>val .sum = foldfrom(
Line 2,412: Line 2,416:
split ZLS, .code,
split ZLS, .code,
)
)
# split and pseries both using unbounded lists, ending before comma preceding line return
# split and pseries both using unbounded lists, ending before comma preceding line return</lang>

</lang>
<lang langur>for .key in sort(keys .tests) {
val .pass = .isintest(.key)
write .key, ": ", .pass
writeln if(.pass == .tests[.key]: ""; " (ISIN TEST FAILED)")
}
# unbounded list on keys bounded by closing parenthesis of sort</lang>


=={{header|LFE}}==
=={{header|LFE}}==