|
|
|
|
|
by Veen
3529 days ago
|
|
> You write your base functions, then higher-level functions which use those base functions, and so on. Functions all the way down. I'm hoping to follow a similar trajectory to you, but with Elixir instead of closure. At the moment though, I tend to do things the other way around: write the top level functions and then fill out the base functions. So I'd start a module with def whatever(something), do:
something
|> function1
|> function2
|> function3 Then I'll write function1, 2, and 3 and whatever helper functions they need. And so on until it works. Maybe doing it your way is a better approach: helps you think it through first. (although I'm aware some would say that tests should come before everything else anyway) |
|