Lets say we have a record which defines a person type with the properties name
and age
:
type person = {name:string ; age:int };;
and initialize a list with different types:
let personlist = [{name="alexander";age=21};{name="benjamin";age=30};{name="claudia";age=21}];;
How can I count the amount of types with a specific age, lets say 21 (alexander and claudia) so that the output in this case would be two?