This file contains hidden or 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
abstract class Animal<F extends Food> { abstract void eats(F f);} | |
abstract class Food {} | |
class Veg extends Food {} | |
class Meat extends Food {} | |
class Grass extends Veg {} | |
class Carrot extends Veg {} | |
class Cow extends Animal<Veg> { void eats(Veg f) {}} | |
class Main { | |
public static void main(String[] args) { |
This file contains hidden or 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
org.drools.workbench.models.guided.dtable.shared.model.GuidedDecisionTable52 unmarshal = | |
org.drools.workbench.models.guided.dtable.backend.GuidedDTXMLPersistence.getInstance().unmarshal( | |
new String(Files.readAllBytes(Paths.get("src/main/resources/guidedTable.gdst"))) | |
); | |
String drl = org.drools.workbench.models.guided.dtable.backend.GuidedDTDRLPersistence.getInstance().marshal(unmarshal); | |
System.out.println(drl); |
This file contains hidden or 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
module Assign where | |
import Data.IORef | |
mkSummer :: IO (Int -> Int -> IO Int) | |
mkSummer = do | |
ref <- newIORef 0 | |
return $ \x y -> do | |
val <- readIORef ref |
This file contains hidden or 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
miles@frege:~$ ./shapeless.sh | |
Loading... | |
Welcome to the Ammonite Repl 0.5.2 | |
(Scala 2.11.7 Java 1.8.0_51) | |
@ val l = 23 :: "foo" :: true :: HNil | |
l: Int :: String :: Boolean :: HNil = ::(23, ::("foo", ::(true, HNil))) | |
@ |