fuzion-lang.dev — The Fuzion Language Portal
JavaScript seems to be disabled. Functionality is limited.
Fuzion
•
Idioms
•
Idiom # 316: Count occurrences in a list
Idiom # 316: Count occurrences in a list
See
programming-idioms.org
:
Code
x.filter(p).count
What are effects?
Runnable Example
ex316 is x := "Hello World!".as_codepoints p codepoint -> bool := ="l" c := x.filter(p).count say c
What are effects?
last changed: 2024-07-01
next: Idiom # 317: Random string