This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.function.*; | |
/* | |
Problem solved -- thanks to https://www.reddit.com/user/Yggval for identifying the trouble | |
(see https://www.reddit.com/r/javahelp/comments/gkid8w/trouble_with_generics/) | |
Working solution follows: essentially, Sequence<T> needs to be Sequence<T, U> so the | |
Compose<IdentifierNode, IdentifierNode, TypeExpressionNode> which extends NodeParseRule<IdentifierNode, TypeExpressionNode> | |
can map to the first argument of the Sequence constructor. | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Scanner; | |
public class CardFlip { | |
static boolean DEBUG = false; | |
private enum CardValue { | |
A, B, C, D; | |
} | |
private static class Card { |