Last active
February 3, 2026 20:27
-
-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 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