Home | Notifications | New Note | Local | Federated | Search | Logout
Note Detail
Reply to @tembok@misskey.id
Layar Laut@layarlaut@misskey.id (2026-09-19 09:06:48)
@tembok where do you read that? as long as A is pure. It's fine to directly call A inside B.
And in the case A is impure and B needs some thing from A, the result of A is the one that should be passed along rather than A itself. Passing A would make B impure.
The only time you need to pass a function is when you need different functionality depending with the same structure or when you need dependency injection
---Reply---
Layar Laut@layarlaut@misskey.id (2026-09-19 09:17:20)
@tembok even then dependency injection is reserved to the outer most function that talk to the outside world
Reply