mirror of
https://github.com/mcanlas/6502-opcodes.git
synced 2024-12-21 18:29:22 +00:00
demonstrate file writing
This commit is contained in:
parent
d9fedd52dd
commit
f3feb1ac06
@ -19,7 +19,7 @@ lazy val scratchpad =
|
|||||||
lazy val demo =
|
lazy val demo =
|
||||||
module("demo")
|
module("demo")
|
||||||
.withEfectMonad
|
.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/"
|
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:
|
object PrintPrograms extends ZIOAppDefault:
|
||||||
def run: ZIO[Any, Throwable, Unit] =
|
def run: ZIO[Any, Throwable, Unit] =
|
||||||
File("data/example.txt")
|
for {
|
||||||
.contents
|
_ <- File("data/out.txt")
|
||||||
.map(println)
|
.writeLine("out")
|
||||||
|
|
||||||
|
_ <- File("data/example.txt")
|
||||||
|
.contents
|
||||||
|
.map(Console.printLine(_))
|
||||||
|
} yield ()
|
||||||
|
Loading…
Reference in New Issue
Block a user