MCPcopy Create free account

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

Functions421 in github.com/adonovan/gopl.io

↓ 30 callersMethodClose
()
ch9/memo5/memo.go:54
↓ 26 callersMethodGet
(key string)
ch9/memotest/memotest.go:55
↓ 21 callersMethodAdd
Add adds the non-negative value x to the set.
ch6/intset/intset.go:29
↓ 20 callersFunctionDisplay
!+Display
ch12/display/display.go:17
↓ 17 callersMethodEval
Eval returns the value of this Expr in the environment env.
ch7/eval/ast.go:9
↓ 17 callersMethodString
()
ch7/http4/main.go:29
↓ 11 callersMethodLen
()
ch7/sorting/main.go:69
↓ 10 callersFunctionEqual
!- !+comparison Equal reports whether x and y are deeply equal. !-comparison Map keys are always compared with ==, not deeply. (This matters for keys
ch13/equal/equal.go:117
↓ 10 callersMethodnext
()
ch7/eval/parse.go:21
↓ 8 callersFunctionhasEdge
(from, to string)
ch4/graph/main.go:23
↓ 8 callersMethodnext
()
ch12/sexpr/decode.go:43
↓ 7 callersMethodCheck
Check reports errors in this Expr and adds its Vars to the set.
ch7/eval/ast.go:11
↓ 7 callersFunctionImageFile
ImageFile reads an image from infile and writes a thumbnail-size version of it in the same directory. It returns the generated file name, e.g. "foo.th
ch8/thumbnail/thumbnail.go:82
↓ 7 callersMethodSet
(s string)
ch7/tempconv/tempconv.go:38
↓ 7 callersMethodtext
()
ch12/sexpr/decode.go:44
↓ 6 callersMethodWork
Work runs the simulation 'runs' times.
ch8/cake/cake.go:71
↓ 6 callersFunctionf
(x int)
ch5/defer1/defer.go:16
↓ 6 callersFunctionread
!-lexer The read function is a decoder for a small subset of well-formed S-expressions. For brevity of our example, it takes many dubious shortcuts.
ch12/sexpr/decode.go:77
↓ 5 callersMethodClose
!-write !+close Close flushes the compressed data and closes the stream. It does not close the underlying io.Writer.
ch13/bzip/bzip2.go:89
↓ 5 callersFunctionConcurrent
* //!+conc m := memo.New(httpGetBody) //!-conc */
ch9/memotest/memotest.go:85
↓ 5 callersFunctionIsPalindrome
IsPalindrome reports whether s reads the same forward and backward. (Our first attempt.)
ch11/word1/word.go:12
↓ 5 callersFunctionIsPalindrome
IsPalindrome reports whether s reads the same forward and backward. Letter case is ignored, as are non-letters.
ch11/word2/word.go:14
↓ 5 callersFunctionParse
---- parser ---- Parse parses the input string as an arithmetic expression. expr = num a literal number, e.g., 3.14159 | id
ch7/eval/parse.go:59
↓ 5 callersFunctionSequential
* //!+seq m := memo.New(httpGetBody) //!-seq */
ch9/memotest/memotest.go:64
↓ 5 callersMethodbegin
()
ch12/sexpr/pretty.go:55
↓ 5 callersMethodend
()
ch12/sexpr/pretty.go:64
↓ 5 callersFunctionreverse
!+rev reverse reverses a slice of ints in place.
ch4/rev/main.go:54
↓ 5 callersMethodspace
()
ch12/sexpr/pretty.go:79
↓ 5 callersMethodstring
(str string)
ch12/sexpr/pretty.go:41
↓ 4 callersFunctionAny
Any formats any value as a string.
ch12/format/format.go:16
↓ 4 callersFunctionExtract
Extract makes an HTTP GET request to the specified URL, parses the response as HTML, and returns the links in the HTML document.
ch5/links/links.go:19
↓ 4 callersFunctionSearchIssues
SearchIssues queries the GitHub issue tracker.
ch4/github/search.go:17
↓ 4 callersMethodString
!-intset !+string String returns the set as a string of the form "{1 2 3}".
ch6/intset/intset.go:53
↓ 4 callersFunctionaddEdge
(from, to string)
ch4/graph/main.go:14
↓ 4 callersMethodconsume
(want rune)
ch12/sexpr/decode.go:46
↓ 4 callersFunctioncorner
(i, j int)
ch3/surface/main.go:43
↓ 4 callersFunctioncorner
sin(30°), cos(30°)
ch7/surface/surface.go:34
↓ 4 callersMethoddescribe
describe returns a string describing the current token, for use in errors.
ch7/eval/parse.go:27
↓ 4 callersFunctionendList
(lex *lexer)
ch12/sexpr/decode.go:152
↓ 4 callersFunctionlength
(s string)
ch7/sorting/main.go:33
↓ 4 callersFunctionprintTracks
!-main !+printTracks
ch7/sorting/main.go:44
↓ 4 callersFunctionsum
!+
ch5/sum/main.go:12
↓ 4 callersMethodtext
()
ch7/eval/parse.go:22
↓ 3 callersMethodDistance
!-decl
ch6/coloredpoint/main.go:26
↓ 3 callersFunctionIsUp
!+
ch3/netflag/netflag.go:15
↓ 3 callersFunctionNewWriter
NewWriter returns a writer for bzip2-compressed streams.
ch13/bzip/bzip2.go:52
↓ 3 callersMethodScaleBy
(factor float64)
ch6/coloredpoint/main.go:32
↓ 3 callersFunctionf
(x, y float64)
ch3/surface/main.go:57
↓ 3 callersFunctionparseExpr
(lex *lexer)
ch7/eval/parse.go:82
↓ 3 callersMethodstringf
(format string, args ...interface{})
ch12/sexpr/pretty.go:110
↓ 3 callersFunctionwork
work blocks the calling goroutine for a period of time that is normally distributed around d with a standard deviation of stddev.
ch8/cake/cake.go:86
↓ 2 callersFunctionCToF
(c Celsius)
ch2/tempconv0/celsius.go:21
↓ 2 callersMethodHas
Has reports whether the set contains the non-negative value x.
ch6/intset/intset.go:23
↓ 2 callersFunctionPrint
!+print Print prints the method set of the value x.
ch12/methods/methods.go:17
↓ 2 callersMethodString
!-
ch2/tempconv0/celsius.go:27
↓ 2 callersMethodWrite
!- !+write
ch13/bzip/bzip2.go:64
↓ 2 callersFunctioncountLines
(f *os.File, counts map[string]int)
ch1/dup2/main.go:40
↓ 2 callersFunctionecho
(newline bool, sep string, args []string)
ch11/echo/echo.go:33
↓ 2 callersFunctionfToC
(f float64)
ch2/ftoc/main.go:18
↓ 2 callersFunctionformatAtom
!-Display formatAtom formats a value without inspecting its internal structure. It is a copy of the the function in gopl.io/ch11/format.
ch12/display/display.go:26
↓ 2 callersFunctionincomingURLs
()
ch9/memotest/memotest.go:34
↓ 2 callersFunctionlissajous
(out io.Writer)
ch1/lissajous/main.go:59
↓ 2 callersFunctionmustCopy
!-
ch8/netcat2/netcat.go:29
↓ 2 callersMethodpop
()
ch12/sexpr/pretty.go:50
↓ 2 callersFunctionpopulate
!-Unpack !+populate
ch12/params/params.go:65
↓ 2 callersFunctionprecedence
(op rune)
ch7/eval/parse.go:39
↓ 2 callersMethodprint
(t *token)
ch12/sexpr/pretty.go:91
↓ 2 callersFunctionprintDiskUsage
!-
ch8/du3/main.go:79
↓ 2 callersFunctionprintDiskUsage
!-
ch8/du2/main.go:69
↓ 2 callersFunctionprintDiskUsage
(nfiles, nbytes int64)
ch8/du4/main.go:89
↓ 1 callersFunctionBitCount
-- Alternative implementations --
ch2/popcount/popcount_test.go:14
↓ 1 callersFunctionCToF
CToF converts a Celsius temperature to Fahrenheit.
ch2/tempconv/conv.go:11
↓ 1 callersFunctionCelsiusFlag
!-celsiusFlag !+CelsiusFlag CelsiusFlag defines a Celsius flag with the specified name, default value, and usage, and returns the address of the flag
ch7/tempconv/tempconv.go:60
↓ 1 callersFunctionCheckQuota
(username string)
ch11/storage2/storage.go:38
↓ 1 callersMethodClose
!-write !+close Close flushes the compressed data and closes the stream. It does not close the underlying io.Writer.
ch13/bzip-print/bzip2.go:75
↓ 1 callersFunctionFToC
(f Fahrenheit)
ch7/tempconv/tempconv.go:18
↓ 1 callersFunctionFToC
(f Fahrenheit)
ch2/tempconv0/celsius.go:23
↓ 1 callersFunctionFToC
FToC converts a Fahrenheit temperature to Celsius.
ch2/tempconv/conv.go:14
↓ 1 callersFunctionImage
Image returns a thumbnail-size version of src.
ch8/thumbnail/thumbnail.go:21
↓ 1 callersFunctionImageFile2
ImageFile2 reads an image from infile and writes a thumbnail-size version of it to outfile.
ch8/thumbnail/thumbnail.go:60
↓ 1 callersFunctionImageStream
ImageStream reads an image from r and writes a thumbnail-size version of it to w.
ch8/thumbnail/thumbnail.go:49
↓ 1 callersFunctionIsCast
(v Flags)
ch3/netflag/netflag.go:18
↓ 1 callersFunctionMarshal
!+Marshal Marshal encodes a Go value in S-expression form.
ch12/sexpr/encode.go:16
↓ 1 callersFunctionMarshalIndent
(v interface{})
ch12/sexpr/pretty.go:15
↓ 1 callersFunctionPopCount
PopCount returns the population count (number of set bits) of x.
ch2/popcount/main.go:20
↓ 1 callersFunctionPopCountByClearing
(x uint64)
ch2/popcount/popcount_test.go:25
↓ 1 callersFunctionPopCountByShifting
(x uint64)
ch2/popcount/popcount_test.go:34
↓ 1 callersFunctionSetBroadcast
(v *Flags)
ch3/netflag/netflag.go:17
↓ 1 callersFunctionSort
Sort sorts values in place.
ch4/treesort/sort.go:16
↓ 1 callersFunctionTurnDown
(v *Flags)
ch3/netflag/netflag.go:16
↓ 1 callersMethodUnionWith
UnionWith sets s to the union of s and t.
ch6/intset/intset.go:38
↓ 1 callersFunctionUnmarshal
!+Unmarshal Unmarshal parses S-expression data and populates the variable whose address is in the non-nil pointer out.
ch12/sexpr/decode.go:21
↓ 1 callersFunctionUnpack
!+Unpack Unpack populates the fields of the struct pointed to by ptr from the HTTP request parameters in req.
ch12/params/params.go:21
↓ 1 callersFunctionWaitForServer
!+ WaitForServer attempts to contact the server of a URL. It tries for one minute using exponential back-off. It reports an error if all attempts fail
ch5/wait/wait.go:21
↓ 1 callersMethodWrite
!- !+write
ch13/bzip-print/bzip2.go:50
↓ 1 callersMethodWrite
(p []byte)
ch7/bytecounter/main.go:17
↓ 1 callersFunctionadd
(t *tree, value int)
ch4/treesort/sort.go:35
↓ 1 callersFunctionappendInt
!+append
ch4/append/main.go:32
↓ 1 callersFunctionappendValues
appendValues appends the elements of t to values in order and returns the resulting slice.
ch4/treesort/sort.go:26
↓ 1 callersMethodbaker
(baked chan<- cake)
ch8/cake/cake.go:35
next →1–100 of 421, ranked by callers