<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/abstracting-effects-with-continuations-rscdehe5t" -->

---
title: Abstracting effects with continuations | daily.dev
description: Continuations can abstract over different kinds of computational effects — fallible, asynchronous, or otherwise — allowing a single piece of business logic to...
canonical: https://daily.dev/posts/abstracting-effects-with-continuations-rscdehe5t
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Abstracting effects with continuations | daily.dev
og:description: Continuations can abstract over different kinds of computational effects — fallible, asynchronous, or otherwise — allowing a single piece of business logic to...
og:url: https://daily.dev/posts/abstracting-effects-with-continuations-rscdehe5t
og:image: https://api.daily.dev/og/posts/RsCDEhe5T.png
og:image:alt: Abstracting effects with continuations
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Abstracting effects with continuations

**[Lobsters](https://daily.dev/sources/lobsters)** · 6 min read · 0 upvotes · 0 comments

## Summary

Continuations can abstract over different kinds of computational effects — fallible, asynchronous, or otherwise — allowing a single piece of business logic to work with any effect type. Using Gleam, the post demonstrates how a `Continuation(t, a)` type (a function that takes a callback and returns `t`) lets you write one generic task function, then supply different 'runners' that interpret the effect: a simple synchronous runner, a fallible runner returning `Result`, and an async runner returning `Promise`. This mirrors the theoretical result from Filinski (1994) that continuations can represent any monad, without requiring separate implementations for each effect combination.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://crowdhailer.me/2026-07-15/abstracting-effects-with-continuations>

## Similar posts on daily.dev

- [A universal approach to mocking with continuations](https://daily.dev/posts/a-universal-approach-to-mocking-with-continuations-pcjsi5jr9) · Lobsters · 0 upvotes · 0 comments
- [Kotlin Coroutines Internals: Continuation, State Machines, and the Compiler Transformation](https://daily.dev/posts/kotlin-coroutines-internals-continuation-state-machines-and-the-compiler-transformation-tylggvfas) · Medium · 1 upvotes · 0 comments
- [You don't need an effect system](https://daily.dev/posts/you-don-t-need-an-effect-system-1jg8fivth) · Lobsters · 0 upvotes · 0 comments
- [Inside Kotlin Coroutines: State Machines, Continuations, and Structured Concurrency.](https://daily.dev/posts/inside-kotlin-coroutines-state-machines-continuations-and-structured-concurrency--e1itwlfqx) · droidcon · 0 upvotes · 0 comments
- [What Async Promised and What it Delivered — Causality](https://daily.dev/posts/what-async-promised-and-what-it-delivered-causality-ocp1tkuw6) · Hacker News · 17 upvotes · 6 comments

---

Tags: [#functional-programming](https://daily.dev/tags/functional-programming), [#gleam](https://daily.dev/tags/gleam)

[View this post on daily.dev](https://daily.dev/posts/abstracting-effects-with-continuations-rscdehe5t)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Abstracting effects with continuations","url":"https://daily.dev/posts/abstracting-effects-with-continuations-rscdehe5t","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/abstracting-effects-with-continuations-rscdehe5t"},"datePublished":"2026-07-16T13:34:43.925Z","dateModified":"2026-07-16T13:35:07.216Z","description":"Continuations can abstract over different kinds of computational effects — fallible, asynchronous, or otherwise — allowing a single piece of business logic to...","image":"https://media.daily.dev/image/upload/s--0_ODbtD2--/f_auto/v1722860399/public/Placeholder%2008","thumbnailUrl":"https://media.daily.dev/image/upload/s--0_ODbtD2--/f_auto/v1722860399/public/Placeholder%2008","isAccessibleForFree":true,"articleSection":"Lobsters","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Lobsters","logo":"https://media.daily.dev/image/upload/s--tl8v_Fku--/f_auto,t_logo/v1698841318/logos/lobste.jpg","url":"https://daily.dev/sources/lobsters"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/abstracting-effects-with-continuations-rscdehe5t","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"functional-programming,gleam","timeRequired":"PT6M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Lobsters","item":"https://daily.dev/sources/lobsters"},{"@type":"ListItem","position":3,"name":"Abstracting effects with continuations"}]}
```

