All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.aol.cyclops.javaslang.FromJDK Maven / Gradle / Ivy

There is a newer version: 8.4.2
Show newest version
package com.aol.cyclops.javaslang;

import java.util.function.BiFunction;
import java.util.function.Function;

import javaslang.Function1;
import javaslang.Function2;
import javaslang.control.Option;

public class FromJDK {
	
	public static   Function1 f1(Function fn){
		return (t) -> fn.apply(t);
	}
	public static   Function2 f2(BiFunction fn){
		return (t,x) -> fn.apply(t,x);
	}
	public static Option option(java.util.Optional o){
		return Option.of(o.orElse(null));
	}
	
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy