// Path: src/main/java/ch/codebulb/lambdaomega/L.java
// public static <T> List<T> list(T... ts) {
//     return l(ts).l;
// }
// 
// Path: src/main/java/ch/codebulb/lambdaomega/abstractions/OmegaObject.java
// public abstract class OmegaObject {
//     /**
//      * Prints itself to the standard output.
//      */
//     public void println() {
//         U.println(this);
//     }
// }
// 
// Path: src/main/java/ch/codebulb/lambdaomega/abstractions/ReadonlyIndexedI.java
// public interface ReadonlyIndexedI<K, V> extends I<K, V> {
//     
// }


import static ch.codebulb.lambdaomega.L.list;
import ch.codebulb.lambdaomega.abstractions.OmegaObject;
import ch.codebulb.lambdaomega.abstractions.ReadonlyIndexedI;
import java.util.List;
import java.util.Objects;
import java.util.function.Function;
package ch.codebulb.lambdaomega;



/**
 * The "V2" stands for "2d vector". This is an implementation of a 2-dimensional vector = a 2-ary tuple.<p/>
 * 
 * The constructor of this class is not visible; use the convenience {@link #v(Object, Object)} method to create a new instance of this class.
 * It's best practice to statically import this function in client code.
 *
 * @param <X> the type of the 1st element
 * @param <Y> the type of the 2nd element
 */
public class V2<X, Y> extends OmegaObject implements ReadonlyIndexedI<Integer, Object> {
    private X x;
    private Y y;
    private Function<Integer, Object> defaultFunction;

    V2(X x, Y y) {
        this.x = x;
        this.y = y;
    }
    
    /**
     * Creates a {@link V2} consisting of the value pair <code>x</code>, <code>y</code>.
     */
    public static <X, Y> V2<X, Y> v(X x, Y y) {
        return new V2(x, y);
    }
    
    /**
     * Turns this vector into a {@link LV2} with subsequent {@link LV2#a(Object, Object)} call.
     */
    public LV2<X, Y> a(X x, Y y) {
// Path: src/main/java/ch/codebulb/lambdaomega/L.java
// public static <T> List<T> list(T... ts) {
//     return l(ts).l;
// }
// 
// Path: src/main/java/ch/codebulb/lambdaomega/abstractions/OmegaObject.java
// public abstract class OmegaObject {
//     /**
//      * Prints itself to the standard output.
//      */
//     public void println() {
//         U.println(this);
//     }
// }
// 
// Path: src/main/java/ch/codebulb/lambdaomega/abstractions/ReadonlyIndexedI.java
// public interface ReadonlyIndexedI<K, V> extends I<K, V> {
//     
// }


// Path: src/main/java/ch/codebulb/lambdaomega/V2.java
import static ch.codebulb.lambdaomega.L.list;
import ch.codebulb.lambdaomega.abstractions.OmegaObject;
import ch.codebulb.lambdaomega.abstractions.ReadonlyIndexedI;
import java.util.List;
import java.util.Objects;
import java.util.function.Function;

package ch.codebulb.lambdaomega;



/**
 * The "V2" stands for "2d vector". This is an implementation of a 2-dimensional vector = a 2-ary tuple.<p/>
 * 
 * The constructor of this class is not visible; use the convenience {@link #v(Object, Object)} method to create a new instance of this class.
 * It's best practice to statically import this function in client code.
 *
 * @param <X> the type of the 1st element
 * @param <Y> the type of the 2nd element
 */
public class V2<X, Y> extends OmegaObject implements ReadonlyIndexedI<Integer, Object> {
    private X x;
    private Y y;
    private Function<Integer, Object> defaultFunction;

    V2(X x, Y y) {
        this.x = x;
        this.y = y;
    }
    
    /**
     * Creates a {@link V2} consisting of the value pair <code>x</code>, <code>y</code>.
     */
    public static <X, Y> V2<X, Y> v(X x, Y y) {
        return new V2(x, y);
    }
    
    /**
     * Turns this vector into a {@link LV2} with subsequent {@link LV2#a(Object, Object)} call.
     */
    public LV2<X, Y> a(X x, Y y) {
        return new LV2(list(this)).a(x, y);