core.call-argument-with-rank
- description
- The argument of the call whose rank (core.call-argument-rank) is rank, searching from index
- type
Fn(arguments: List<Record{name: String, value: @core.expression}>, rank: Number, index: Number) -> Union{#none, #some(Record{name: String, value: @core.expression})}- expression
fn(arguments$0, rank$1, index$2) => match @core.list-get(list: $0, index: $2) { #none(_) => #none, #some(argument$3) => match @core.equal(left: @core.call-argument-rank(arguments: $0, name: $3.name, index: 0, acc: 0), right: $1) { true => #some($3), false => @core.call-argument-with-rank(arguments: $0, rank: $1, index: @core.plus(left: $2, right: 1)) } }
- visibility
- public
core.call-argument-with-rank (project definy, branch compiled-tests, snapshot i6TqClmqVS9FK8rKOvJ43l6Tevx8pvYJ5-zaQqNwemc) id: 2miys8yJuOXK2uDfAFWd4jyvGLPZc9mLOBhUJfP-SLg content hash: oHnBeOAXpzm9E7BtjNAFn-QB4JDkWj1ql8b94hEa5LU