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
| class A | |
| attr_accessor :x | |
| def initialize() | |
| @x = 3 | |
| end | |
| def f() | |
| @x | |
| end | |
| def g() | |
| @x + f() |
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
| package plemm; | |
| import org.junit.Test; | |
| public class PlemmTest { | |
| static class A { | |
| int x; | |
| public A() { |
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
| (** Question 1 **) | |
| fun f1() = | |
| (d = 32; g()) | |
| fun g() = | |
| d + 3 | |
| f1() |
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
| package main | |
| import ( | |
| "bufio" | |
| "crypto/md5" | |
| "encoding/hex" | |
| "encoding/json" | |
| "flag" | |
| "fmt" | |
| "io/ioutil" |
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
| package main | |
| import ( | |
| "bytes" | |
| "encoding/json" | |
| "flag" | |
| "io" | |
| "log" | |
| "net/http" |
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
| go get | |
| go run expvar_demo.go | |
| curl http://localhost:8080/hello?user=lassie | |
| curl http://localhost:8080/hello?user=tom | |
| curl http://localhost:8080/hello?user=IveAVeryLoooongName | |