От: | vaskir | vaskir.blogspot.com | |
Дата: | 09.01.16 09:47 | ||
Оценка: |
NotEmpty(v: string): option[string]
match (v)
| null | _ when v.Trim() == "" => None()
| _ => Some(v)
active match ("foo")
| NotEmpty(_) => Some("wow")
active match ("foo")
| NotEmpty => Some("wow")
NotEmpty(v: string): option[void]
match (v)
| null | _ when v.Trim() == "" => None()
| _ => Some(())
Cannot implicitly convert type 'option.None[?]' to 'option[void]'.