package scotch.data.double_;
import static java.util.Collections.emptyList;
import static scotch.runtime.RuntimeSupport.applicable;
import static scotch.runtime.RuntimeSupport.callable;
import static scotch.symbol.type.TypeDescriptors.fn;
import static scotch.symbol.type.TypeDescriptors.sum;
import java.util.List;
import scotch.data.int_.Int;
import scotch.runtime.Applicable;
import scotch.symbol.DataType;
import scotch.symbol.TypeParameters;
import scotch.symbol.Value;
import scotch.symbol.ValueType;
import scotch.symbol.type.TypeDescriptor;
@SuppressWarnings("unused")
@DataType(memberName = "Double")
public class Double_ {
public static TypeDescriptor TYPE = sum("scotch.data.double.Double");
@TypeParameters
public static List<TypeDescriptor> parameters() {
return emptyList();
}
@Value(memberName = "toInt")
public static Applicable<Double, Integer> toInt() {
return applicable(operand -> callable(() -> operand.call().intValue()));
}
@ValueType(forMember = "toInt")
public static TypeDescriptor toInt$type() {
return fn(TYPE, Int.TYPE);
}
}