Suppose I have a function that returns a certain value when it satisfies a given condition and does not return any value when the condition is not satisfied.
e.g.
fun foo(n)= if n< 100000 then n else (something like exit function. We have it in other programming languages. Do we have something like that here?)
I initially wanted to write () but it says mismatch in two conditions of if or something.
Becoming more explicit, I want to write a function that takes a number, any number and combines to a list if it is valid integer and disregards it if it is not integer.