Patternmatching New Question

OCaml: How to traverse a list parameter in a recor
If I have a data structure such astype cost = inttype 'a map = { cities : 'a list routes : ('a * 'a * cost) list}And say I have a function with a header such aslet nearest_cities (m : 'a ...... 
Proper way of ReasonML record patternmatching
I have a record type that goes,type person = { name: string, gender: string, age: int}and have lots of records that fit with the type. What I want to do is to extract only [name, age] from the ...... 
OCaml match on string option ref
How do I do a pattern match on a variable that has type string option ref in OCaml. I need to extract the string part of this variable, but I can't get it to work.... 
How can I simplify nested pattern matching clauses
I have nested data types with a lot of option modifiers. I want to simplify the source code of functions when I need to match the nested types.Consider example:type ty = Ty1  Ty2let func = ...... 
Modelling a grammar with GADT, but type parameter
I thought that I've found a neat way to model grammars using GADTs by giving each constructor (e.g. Char) a return type parameter that is a polymorphic variant (e.g. [`Char] t) and then using ...... 
Pattern matching on a GADT fails
I was playing around a bit more with ReasonML and found pattern matching on type t from the following example to not be working with the error Error: This pattern matches values of type t(float) ...... 
Algorithm for pattern searching using suffix and l
I want to construct the set of letters that occur just before a pattern using suffix and the lcp array.let y be our string and SA = suffix array.the patterns that i'm looking for have this form :...... 
how to limit a parameter to only one variant of a
Suppose I have two types, Vector2D and Vector3D and they are tagged (that's the correct term, right?), and I want to write a function that operates ONLY on Vector2D (or is vector(two) more correct ...... 
Unification in pattern matching case
I was trying to write a function whose type is forall n, option (n = 1).I choose option as an altertnative to reflect avoiding giving the proof of the negative case. So Some plays the role ReflectT ...... 
Why does this function/constructor argument become
I'm trying to implement Agda's inspect idiom in Idris, as a possible workaround for this problem, however, it seems when I pattern match on the MkReveal constructor, the choice of f is lost and ...... 
How to match up external proofs about function'
I have proven the following lemma:partitionLen : (p : a > Bool) > (xs : Vect len a) > let (ys, ns) = partition p xs in fst ys + fst ns = lenNow I would like to use it (inside a do ...... 
Can Raku guarantee that a pattern match is exhaust
Consider the following toy code:my $agecheck = do given 18 { when $_ > 18 { 'old enough' } when $_ < 18 { 'too young' }};say "The user is $agecheck" # OUTPUT: «The ...... 
ReasonML way of returning various types from a sin
I have predefined types that goes,type objA = {name: string}type objB = {age: int}and I want to have a variant type that goes,type test =  Atype(objA) Btype(objB)and ultimately use pattern......