new file: resources/bytecode/javFiles/PaternMatchingHaskellStyle.jav
Some checks failed
Build and Test with Maven / Build-and-test-with-Maven (push) Failing after 51s
Some checks failed
Build and Test with Maven / Build-and-test-with-Maven (push) Failing after 51s
This commit is contained in:
parent
e1e744152a
commit
5893338783
11
resources/bytecode/javFiles/PaternMatchingHaskellStyle.jav
Normal file
11
resources/bytecode/javFiles/PaternMatchingHaskellStyle.jav
Normal file
@ -0,0 +1,11 @@
|
||||
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));
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user