com.github.mperry.fg.IOConstants.groovy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of functionalgroovy-main Show documentation
Show all versions of functionalgroovy-main Show documentation
FunctionalGroovy enhances FunctionalJava for Groovy
package com.github.mperry.fg;
import fj.Unit
import fj.data.Option
import groovy.transform.TypeChecked;
/**
* Created with IntelliJ IDEA.
* User: MarkPerry
* Date: 8/11/13
* Time: 10:21 AM
* To change this template use File | Settings | File Templates.
*/
@TypeChecked
class IOConstants {
static Option console() {
Option.fromNull(System.console())
}
static SimpleIO stdinReadLine() {
new SimpleIO() {
String run() {
System.in.newReader().readLine()
}
}
}
static SimpleIO
© 2015 - 2024 Weber Informatics LLC | Privacy Policy