Removing effects from business logic

This is a thing (state machine? effects-processing pipeline?) I'm trying out to keep effectful code separate from business logic, to make testing easier. It's partially inspired by re-frame's event handling. The idea isn't new, but I'd never actually done it for my own code until now. I'd be curious to hear what other things people have done in this vein. I like this more than the typical approach of just mocking out the effectful bits. I was working on the following function, which is the HTTP request hand

添加评论
点赞收藏
点踩分享查看原文
评论
?
参与讨论