Skip to content

Instantly share code, notes, and snippets.

@dacr
Last active February 3, 2026 20:27
Show Gist options
  • Select an option

  • Save dacr/37dbfa5a3b519eb2f2eb571a3d2c3c46 to your computer and use it in GitHub Desktop.

Select an option

Save dacr/37dbfa5a3b519eb2f2eb571a3d2c3c46 to your computer and use it in GitHub Desktop.
hello world with cats-effect / published by https://github.com/dacr/code-examples-manager #ccf93eab-dd65-4711-81ad-69eccccf71b1/662f1d4296d30f753b53d52e99fb10624b5df5a1
// summary : hello world with cats-effect
// keywords : scala, cats, effect, learning, pure-functional, helloworld, @testable
// publish : gist
// authors : David Crosson
// license : Apache License Version 2.0 (https://www.apache.org/licenses/LICENSE-2.0.txt)
// id : ccf93eab-dd65-4711-81ad-69eccccf71b1
// created-on : 2022-01-06T17:55:38+01:00
// managed-by : https://github.com/dacr/code-examples-manager
// run-with : scala-cli $file
// ---------------------
//> using scala "3.5.1"
//> using dep "org.typelevel::cats-effect:3.5.4"
// ---------------------
import cats._
import cats.effect.IO
import cats.effect.unsafe.implicits.global
val program = for {
_ <- IO { println("Hello world") }
} yield ()
program.unsafeRunSync()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment