
17 Jan
2017
17 Jan
'17
1:06 p.m.
Hi Frederic, On Tue, Jan 17, 2017 at 05:34:05PM +0000, PICCA Frederic-Emmanuel wrote:
I tought that was the purpose of the Monad to avoid writting these boillerplate ?
What I am missing ?
You don't pattern match on 'Just' but just write: gamma <- get_position' (h5gamma d) 0 delta <- get_position' (h5delta d) idx wavelength <- get_position' (h5wavelength d) 0 If e.g. 'gamma' is 'Nothing', then the following expressions aren't evaluated and the whole "do-block" returns 'Nothing'. Greetings, Daniel