Here is another strategy that came to mind. Instead of returning a value that is sometimes invisible, you could have a modifier that sometimes performs a no-op:
appendWhen : Bool -> Node -> List Node -> List Node appendWhen condition node nodes = if condition then nodes ++ [node] else nodes On Mon, May 16, 2016 at 5:26 PM, Max Goldstein <maxgoldste...@gmail.com> wrote: > Perhaps use List.filterMap to drop Nothing? But all of the nonconditional > nodes must be prefaced with Just <| which is annoying. > > -- > 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 elm-discuss+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- 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 elm-discuss+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.