splitf-txexpr: how to use the resulting txexpr
#127
Closed
opened 3 years ago by oldmankit
·
2 comments
Loading…
Reference in New Issue
There is no content yet.
Delete Branch '%!s(<nil>)'
Deleting a branch is permanent. It CANNOT be undone. Continue?
I'm trying to use the splitf-txexpr function but have run into a problem.
From the example:
It returns two lists:
I want to put the first list through
->html
, but trying that gives an arity error. It looks like thesplitf-txexpr
function returns two lists, and->html
will only accept one argument. Surely this must be easy to solve…I tried to get this down to simplest terms, with two lists,
'(1 2) '(3 4)
, and figure out how to get back just the first list. This seems to do it:But when I try that with:
again I get arity mismatch.
splitf-txexpr
returns two values — not one list holding two values — so you need to destructure the result withdefine-values
,let-values
et al.Thank you! I hadn't properly understand the concept of a "value".