mirror of
https://github.com/mcanlas/6502-opcodes.git
synced 2024-12-21 03:29:30 +00:00
demonstrate file writing
This commit is contained in:
parent
d9fedd52dd
commit
f3feb1ac06
@ -19,7 +19,7 @@ lazy val scratchpad =
|
||||
lazy val demo =
|
||||
module("demo")
|
||||
.withEfectMonad
|
||||
.settings(libraryDependencies += "com.htmlism" %% "rufio-zio" % "71-5394aaef")
|
||||
.settings(libraryDependencies += "com.htmlism" %% "rufio-zio" % "74-5cd25e9b")
|
||||
|
||||
ThisBuild / resolvers += "mcanlas/rufio" at "https://maven.pkg.github.com/mcanlas/rufio/"
|
||||
|
||||
|
@ -8,6 +8,11 @@ import com.htmlism.rufio.withzio._
|
||||
|
||||
object PrintPrograms extends ZIOAppDefault:
|
||||
def run: ZIO[Any, Throwable, Unit] =
|
||||
File("data/example.txt")
|
||||
.contents
|
||||
.map(println)
|
||||
for {
|
||||
_ <- File("data/out.txt")
|
||||
.writeLine("out")
|
||||
|
||||
_ <- File("data/example.txt")
|
||||
.contents
|
||||
.map(Console.printLine(_))
|
||||
} yield ()
|
||||
|
Loading…
Reference in New Issue
Block a user