But how then to pull current date in the functions where it could not be passed? For example I want to List.filter comparing to current date but I can not pass additional parameters to comparison function.
On Monday, November 21, 2016 at 8:33:55 PM UTC+1, Tim Bezhashvyly wrote: > > Makes sense. Thank you. > > On Monday, November 21, 2016 at 8:32:14 PM UTC+1, OvermindDL1 wrote: >> >> Date.now would not be a functional call that way (returning the same >> output for the same input) thus that could not work (without hacks like >> native modules, but that would also break reproduceability). By making it >> an effect it can just return a request to get the actual date. >> >> >> On Monday, November 21, 2016 at 12:29:09 PM UTC-7, Tim Bezhashvyly wrote: >>> >>> Sorry for starting it again but do I really need to do Task.perform just >>> to print current year just once? "Date.year Date.now" doesn't work as >>> Date.now returns Task.Task x Date.Date. >>> >> -- You received this message because you are subscribed to the Google Groups "Elm Discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
