JavaCompilerCore/resources/bytecode/javFiles/PaternMatchingHaskellStyle.jav
pl@gohorb.ba-horb.de 5893338783
Some checks failed
Build and Test with Maven / Build-and-test-with-Maven (push) Failing after 51s
new file: resources/bytecode/javFiles/PaternMatchingHaskellStyle.jav
2024-10-25 11:10:00 +02:00

12 lines
294 B
Java

public record Elem<T>(T a) implements List<T> {}
public class PaternMatchingHaskellStyle {
public append(LinkedElem(a, Elem(e)), l2) {
return new LinkedElem<>(a, new LinkedElem<>(e, l2));
}
public append(LinkedElem(a, r), l2) {
new LinkedElem<>(a, append(r, l2));
}
}