8 ms·
I'm also not a fan of passing Optionals into methods. Most of the time it's easier and cleaner just to write an additional method without that optional paramete
by kilink 11y ago
I'm also not a fan of passing Optionals into methods. Most of the time it's easier and cleaner just to write an additional method without that optional parameter.
- Peaker 11y agoIt can grow cartesian though. I think the best compromise is to declare a new data type for the argument, such as: data ExecutionDirectory = ExecuteInCWD | ExecuteInDir FilePath And take an ExecutionDirectory instead of a `Maybe FilePath`. Of course, you need light-weight data declarations for that.