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

com.aol.cyclops.functionaljava.FromGuava Maven / Gradle / Ivy

There is a newer version: 9.0.0-MI7
Show newest version
package com.aol.cyclops.functionaljava;

import com.google.common.base.Function;
import com.google.common.base.Optional;

import fj.F;

import fj.data.Option;

public class FromGuava {
    public static  F f1(Function fn) {
        return (t) -> fn.apply(t);
    }

    public static  Option option(Optional o) {
        if (o.isPresent())
            return Option.some(o.get());
        return Option.none();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy