Cli.list_number: def of cli@0.2.0.0 Import: import cli@0.2.0.0/cli.bend as Cli Lines 6271-6278 of cli@0.2.0.0/cli.bend: https://jend.leeeet.dev/read.txt?path=cli@0.2.0.0/cli.bend&start_line=6271&end_line=6278 import Base # The number of values in lists, counting from k + 1 after a miss, or 0. def list_number(lists: List<&2, List<&2, String>>, +values: List<&2, String>, hit: Bool, +k: Nat) -> Nat: match lists hit: case _ True{}: k case Nil{} False{}: 0n case head <> tail False{}: list_number(tail, values, same_words(head, values), (k + 1n : Nat)) Uses (6): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.add https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=cli@0.2.0.0/cli.bend&name=same_words