MCPcopy Create free account

hub / github.com/adonovan/gopl.io / functions

Functions421 in github.com/adonovan/gopl.io

MethodCheck
(vars map[Var]bool)
ch7/eval/check.go:18
MethodCheck
(vars map[Var]bool)
ch7/eval/check.go:22
MethodCheck
(vars map[Var]bool)
ch7/eval/check.go:29
MethodCheck
(vars map[Var]bool)
ch7/eval/check.go:39
FunctionCheckQuota
(username string)
ch11/storage1/storage.go:29
FunctionDeposit
(amount int)
ch9/bank3/bank.go:17
FunctionDeposit
(amount int)
ch9/bank2/bank.go:15
FunctionDeposit
receive balance
ch9/bank1/bank.go:13
FunctionDistance
traditional function
ch6/geometry/geometry.go:15
MethodDistance
same thing, but as a method of the Point type
ch6/geometry/geometry.go:20
MethodDistance
Distance returns the distance traveled along the path.
ch6/geometry/geometry.go:32
MethodEval
!-env !+Eval1
ch7/eval/eval.go:22
MethodEval
(_ Env)
ch7/eval/eval.go:26
MethodEval
!-Eval1 !+Eval2
ch7/eval/eval.go:34
MethodEval
(env Env)
ch7/eval/eval.go:44
MethodEval
(env Env)
ch7/eval/eval.go:58
FunctionExampleIsPalindrome
!-bench !+example
ch11/word2/word_test.go:58
FunctionExamplePrintDuration
()
ch12/methods/methods_test.go:13
FunctionExamplePrintReplacer
()
ch12/methods/methods_test.go:24
FunctionExample_array
()
ch12/display/display_test.go:85
FunctionExample_equal
()
ch13/equal/equal_test.go:96
FunctionExample_equalCycle
()
ch13/equal/equal_test.go:111
FunctionExample_expr
NOTE: we can't use !+..!- comments to excerpt these tests into the book because it defeats the Example mechanism, which requires the // Output comment
ch12/display/display_test.go:22
FunctionExample_interface
()
ch12/display/display_test.go:68
FunctionExample_movie
()
ch12/display/display_test.go:93
FunctionExample_nilInterface
()
ch12/display/display_test.go:44
FunctionExample_one
()
ch6/intset/intset_test.go:8
FunctionExample_one
()
ch2/tempconv0/tempconv_test.go:8
FunctionExample_ptrToInterface
()
ch12/display/display_test.go:52
FunctionExample_ptrToInterface2
()
ch12/display/display_test.go:76
FunctionExample_slice
()
ch12/display/display_test.go:36
FunctionExample_struct
()
ch12/display/display_test.go:60
FunctionExample_two
()
ch6/intset/intset_test.go:33
FunctionExample_two
()
ch2/tempconv0/tempconv_test.go:27
FunctionFormat
Format formats an expression as a string. It does not attempt to remove unnecessary parens.
ch7/eval/print.go:13
MethodGet
Get is concurrency-safe.
ch9/memo2/memo.go:33
MethodGet
(key string)
ch9/memo4/memo.go:38
MethodGet
!+
ch9/memo3/memo.go:32
MethodGet
(key string)
ch9/memo5/memo.go:47
MethodGet
NOTE: not concurrency-safe!
ch9/memo1/memo.go:31
MethodLen
()
ch7/sorting/main.go:60
MethodLen
()
ch7/sorting/main.go:150
MethodLess
(i, j int)
ch7/sorting/main.go:61
MethodLess
(i, j int)
ch7/sorting/main.go:70
MethodLess
(i, j int)
ch7/sorting/main.go:151
FunctionNew
(f Func)
ch9/memo2/memo.go:20
FunctionNew
(f Func)
ch9/memo4/memo.go:28
FunctionNew
(f Func)
ch9/memo3/memo.go:26
FunctionNew
New returns a memoization of f. Clients must subsequently call Close.
ch9/memo5/memo.go:41
FunctionNew
(f Func)
ch9/memo1/memo.go:26
FunctionNewWriter
NewWriter returns a writer for bzip2-compressed streams.
ch13/bzip-print/bzip2.go:36
MethodServeHTTP
(w http.ResponseWriter, req *http.Request)
ch7/http1/main.go:28
MethodServeHTTP
!+handler
ch7/http2/main.go:27
MethodString
()
ch7/http1/main.go:24
MethodString
()
ch7/http2/main.go:22
MethodString
()
ch7/http3/main.go:18
MethodString
()
ch7/tempconv/tempconv.go:20
MethodString
()
ch2/tempconv/tempconv.go:20
MethodString
()
ch2/tempconv/tempconv.go:21
MethodSwap
(i, j int)
ch7/sorting/main.go:62
MethodSwap
(i, j int)
ch7/sorting/main.go:71
MethodSwap
(i, j int)
ch7/sorting/main.go:152
FunctionTest
This test ensures that the program terminates without crashing.
ch12/display/display_test.go:154
FunctionTest
Test verifies that encoding and decoding a complex data value produces an equal result. The test does not make direct assertions about the encoded ou
ch12/sexpr/sexpr_test.go:21
FunctionTest
(t *testing.T)
ch12/format/format_test.go:14
FunctionTest
(t *testing.T)
ch9/memo2/memo_test.go:15
FunctionTest
(t *testing.T)
ch9/memo4/memo_test.go:15
FunctionTest
(t *testing.T)
ch9/memo3/memo_test.go:15
FunctionTest
(t *testing.T)
ch9/memo5/memo_test.go:15
FunctionTest
(t *testing.T)
ch9/memo1/memo_test.go:15
FunctionTestBank
(t *testing.T)
ch9/bank3/bank_test.go:13
FunctionTestBank
(t *testing.T)
ch9/bank2/bank_test.go:13
FunctionTestBank
(t *testing.T)
ch9/bank1/bank_test.go:13
FunctionTestBzip2
(t *testing.T)
ch13/bzip-print/bzip2_test.go:15
FunctionTestBzip2
(t *testing.T)
ch13/bzip/bzip2_test.go:15
FunctionTestCanalPalindrome
(t *testing.T)
ch11/word1/word_test.go:36
FunctionTestCheckQuotaNotifiesUser
(t *testing.T)
ch11/storage2/quota_test.go:12
FunctionTestConcurrent
(t *testing.T)
ch9/memo2/memo_test.go:20
FunctionTestConcurrent
(t *testing.T)
ch9/memo4/memo_test.go:20
FunctionTestConcurrent
(t *testing.T)
ch9/memo3/memo_test.go:20
FunctionTestConcurrent
(t *testing.T)
ch9/memo5/memo_test.go:21
FunctionTestConcurrent
NOTE: not concurrency-safe! Test fails.
ch9/memo1/memo_test.go:21
FunctionTestCoverage
!+TestCoverage
ch7/eval/coverage_test.go:13
FunctionTestEcho
(t *testing.T)
ch11/echo/echo_test.go:15
FunctionTestEqual
(t *testing.T)
ch13/equal/equal_test.go:12
FunctionTestErrors
!-Eval * //!+output sqrt(A / pi) map[A:87616 pi:3.141592653589793] => 167 pow(x, 3) + pow(y, 3) map[x:12 y:1] => 1729 map[x:9 y:10] => 1729 5 / 9
ch7/eval/eval_test.go:78
FunctionTestEval
!+Eval
ch7/eval/eval_test.go:13
FunctionTestFrenchPalindrome
!-test The tests below are expected to fail. See package gopl.io/ch11/word2 for the fix. !+more
ch11/word1/word_test.go:30
FunctionTestIsPalindrome
!-bench !+test
ch11/word2/word_test.go:19
FunctionTestNonPalindrome
(t *testing.T)
ch11/word1/word_test.go:18
FunctionTestPalindrome
(t *testing.T)
ch11/word1/word_test.go:9
FunctionTestRandomPalindromes
(t *testing.T)
ch11/word2/word_test.go:89
FunctionTestSort
(t *testing.T)
ch4/treesort/sort_test.go:14
Functionacos
!- Some other interesting functions:
ch3/mandelbrot/main.go:55
Functionappendslice
(x []int, y ...int)
ch4/append/main.go:11
Functioncounter
counter echoes the number of calls so far.
ch1/server2/main.go:35
Functioncrawl
!-breadthFirst !+crawl
ch5/findlinks3/findlinks.go:38
FunctiondaysAgo
!-template !+daysAgo
ch4/issuesreport/main.go:30
FunctionendElement
(n *html.Node)
ch5/outline2/outline.go:73
Functionhandler
!+handler handler echoes the HTTP request.
ch1/server3/main.go:22
← previousnext →201–300 of 421, ranked by callers