Is it possible, with simple F# pattern matching transformations, to ignore unmatched values without
Posted
by Phobis
on Stack Overflow
See other posts from Stack Overflow
or by Phobis
Published on 2010-05-13T18:16:26Z
Indexed on
2010/05/13
18:24 UTC
Read the original article
Hit count: 250
So, I previously asked this question:
I was looking at the posted code and I was wondering if this code could be written without it producing a warning:
let [|a;b;c;d|] = s.Split [|'.'|]
IP(parseOrParts a, parseOrParts b, parseOrParts c, parseOrParts d)
Is it possible to do something for the match _ pattern ot ignore? Without adding in something like Active Patterns? i want to keep the code as simple as possible... can I do this without drastically changing this code?
NOTE: Warning is as follows
Warning Incomplete pattern matches on this expression. For example, the value '[|_; _; _; _; _|]' may indicate a case not covered by the pattern(s).
© Stack Overflow or respective owner