handouts/amm-ho.tex
changeset 869 81ee93b87258
parent 838 97df390d64f5
child 870 739039774cee
equal deleted inserted replaced
868:8fb3b6d3be70 869:81ee93b87258
    65 libraries already built-in and also allows one to easily break up code
    65 libraries already built-in and also allows one to easily break up code
    66 into smaller modules. For example reading and writing files in
    66 into smaller modules. For example reading and writing files in
    67 Ammonite can be achieved with
    67 Ammonite can be achieved with
    68 
    68 
    69 \begin{lstlisting}[numbers=none,language=Scala]
    69 \begin{lstlisting}[numbers=none,language=Scala]
    70 scala> import ammonite.ops._
    70 scala> import $ivy.`com.lihaoyi::os-lib:0.8.0`
       
    71 scala> import os._  
    71   
    72   
    72 scala> read(pwd / "file.name")   
    73 scala> read(pwd / "file.name")   
    73 res1: String = """..."""
    74 res1: String = """..."""
    74 
    75 
    75 scala> write.over(pwd / "file.name", "foo bar")
    76 scala> write.over(pwd / "file.name", "foo bar")