Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/adonovan/gopl.io
/ functions
Functions
421 in github.com/adonovan/gopl.io
⨍
Functions
421
◇
Types & classes
83
↓ 30 callers
Method
Close
()
ch9/memo5/memo.go:54
↓ 26 callers
Method
Get
(key string)
ch9/memotest/memotest.go:55
↓ 21 callers
Method
Add
Add adds the non-negative value x to the set.
ch6/intset/intset.go:29
↓ 20 callers
Function
Display
!+Display
ch12/display/display.go:17
↓ 17 callers
Method
Eval
Eval returns the value of this Expr in the environment env.
ch7/eval/ast.go:9
↓ 17 callers
Method
String
()
ch7/http4/main.go:29
↓ 11 callers
Method
Len
()
ch7/sorting/main.go:69
↓ 10 callers
Function
Equal
!- !+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 callers
Method
next
()
ch7/eval/parse.go:21
↓ 8 callers
Function
hasEdge
(from, to string)
ch4/graph/main.go:23
↓ 8 callers
Method
next
()
ch12/sexpr/decode.go:43
↓ 7 callers
Method
Check
Check reports errors in this Expr and adds its Vars to the set.
ch7/eval/ast.go:11
↓ 7 callers
Function
ImageFile
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 callers
Method
Set
(s string)
ch7/tempconv/tempconv.go:38
↓ 7 callers
Method
text
()
ch12/sexpr/decode.go:44
↓ 6 callers
Method
Work
Work runs the simulation 'runs' times.
ch8/cake/cake.go:71
↓ 6 callers
Function
f
(x int)
ch5/defer1/defer.go:16
↓ 6 callers
Function
read
!-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 callers
Method
Close
!-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 callers
Function
Concurrent
* //!+conc m := memo.New(httpGetBody) //!-conc */
ch9/memotest/memotest.go:85
↓ 5 callers
Function
IsPalindrome
IsPalindrome reports whether s reads the same forward and backward. (Our first attempt.)
ch11/word1/word.go:12
↓ 5 callers
Function
IsPalindrome
IsPalindrome reports whether s reads the same forward and backward. Letter case is ignored, as are non-letters.
ch11/word2/word.go:14
↓ 5 callers
Function
Parse
---- 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 callers
Function
Sequential
* //!+seq m := memo.New(httpGetBody) //!-seq */
ch9/memotest/memotest.go:64
↓ 5 callers
Method
begin
()
ch12/sexpr/pretty.go:55
↓ 5 callers
Method
end
()
ch12/sexpr/pretty.go:64
↓ 5 callers
Function
reverse
!+rev reverse reverses a slice of ints in place.
ch4/rev/main.go:54
↓ 5 callers
Method
space
()
ch12/sexpr/pretty.go:79
↓ 5 callers
Method
string
(str string)
ch12/sexpr/pretty.go:41
↓ 4 callers
Function
Any
Any formats any value as a string.
ch12/format/format.go:16
↓ 4 callers
Function
Extract
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 callers
Function
SearchIssues
SearchIssues queries the GitHub issue tracker.
ch4/github/search.go:17
↓ 4 callers
Method
String
!-intset !+string String returns the set as a string of the form "{1 2 3}".
ch6/intset/intset.go:53
↓ 4 callers
Function
addEdge
(from, to string)
ch4/graph/main.go:14
↓ 4 callers
Method
consume
(want rune)
ch12/sexpr/decode.go:46
↓ 4 callers
Function
corner
(i, j int)
ch3/surface/main.go:43
↓ 4 callers
Function
corner
sin(30°), cos(30°)
ch7/surface/surface.go:34
↓ 4 callers
Method
describe
describe returns a string describing the current token, for use in errors.
ch7/eval/parse.go:27
↓ 4 callers
Function
endList
(lex *lexer)
ch12/sexpr/decode.go:152
↓ 4 callers
Function
length
(s string)
ch7/sorting/main.go:33
↓ 4 callers
Function
printTracks
!-main !+printTracks
ch7/sorting/main.go:44
↓ 4 callers
Function
sum
!+
ch5/sum/main.go:12
↓ 4 callers
Method
text
()
ch7/eval/parse.go:22
↓ 3 callers
Method
Distance
!-decl
ch6/coloredpoint/main.go:26
↓ 3 callers
Function
IsUp
!+
ch3/netflag/netflag.go:15
↓ 3 callers
Function
NewWriter
NewWriter returns a writer for bzip2-compressed streams.
ch13/bzip/bzip2.go:52
↓ 3 callers
Method
ScaleBy
(factor float64)
ch6/coloredpoint/main.go:32
↓ 3 callers
Function
f
(x, y float64)
ch3/surface/main.go:57
↓ 3 callers
Function
parseExpr
(lex *lexer)
ch7/eval/parse.go:82
↓ 3 callers
Method
stringf
(format string, args ...interface{})
ch12/sexpr/pretty.go:110
↓ 3 callers
Function
work
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 callers
Function
CToF
(c Celsius)
ch2/tempconv0/celsius.go:21
↓ 2 callers
Method
Has
Has reports whether the set contains the non-negative value x.
ch6/intset/intset.go:23
↓ 2 callers
Function
Print
!+print Print prints the method set of the value x.
ch12/methods/methods.go:17
↓ 2 callers
Method
String
!-
ch2/tempconv0/celsius.go:27
↓ 2 callers
Method
Write
!- !+write
ch13/bzip/bzip2.go:64
↓ 2 callers
Function
countLines
(f *os.File, counts map[string]int)
ch1/dup2/main.go:40
↓ 2 callers
Function
echo
(newline bool, sep string, args []string)
ch11/echo/echo.go:33
↓ 2 callers
Function
fToC
(f float64)
ch2/ftoc/main.go:18
↓ 2 callers
Function
formatAtom
!-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 callers
Function
incomingURLs
()
ch9/memotest/memotest.go:34
↓ 2 callers
Function
lissajous
(out io.Writer)
ch1/lissajous/main.go:59
↓ 2 callers
Function
mustCopy
!-
ch8/netcat2/netcat.go:29
↓ 2 callers
Method
pop
()
ch12/sexpr/pretty.go:50
↓ 2 callers
Function
populate
!-Unpack !+populate
ch12/params/params.go:65
↓ 2 callers
Function
precedence
(op rune)
ch7/eval/parse.go:39
↓ 2 callers
Method
print
(t *token)
ch12/sexpr/pretty.go:91
↓ 2 callers
Function
printDiskUsage
!-
ch8/du3/main.go:79
↓ 2 callers
Function
printDiskUsage
!-
ch8/du2/main.go:69
↓ 2 callers
Function
printDiskUsage
(nfiles, nbytes int64)
ch8/du4/main.go:89
↓ 1 callers
Function
BitCount
-- Alternative implementations --
ch2/popcount/popcount_test.go:14
↓ 1 callers
Function
CToF
CToF converts a Celsius temperature to Fahrenheit.
ch2/tempconv/conv.go:11
↓ 1 callers
Function
CelsiusFlag
!-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 callers
Function
CheckQuota
(username string)
ch11/storage2/storage.go:38
↓ 1 callers
Method
Close
!-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 callers
Function
FToC
(f Fahrenheit)
ch7/tempconv/tempconv.go:18
↓ 1 callers
Function
FToC
(f Fahrenheit)
ch2/tempconv0/celsius.go:23
↓ 1 callers
Function
FToC
FToC converts a Fahrenheit temperature to Celsius.
ch2/tempconv/conv.go:14
↓ 1 callers
Function
Image
Image returns a thumbnail-size version of src.
ch8/thumbnail/thumbnail.go:21
↓ 1 callers
Function
ImageFile2
ImageFile2 reads an image from infile and writes a thumbnail-size version of it to outfile.
ch8/thumbnail/thumbnail.go:60
↓ 1 callers
Function
ImageStream
ImageStream reads an image from r and writes a thumbnail-size version of it to w.
ch8/thumbnail/thumbnail.go:49
↓ 1 callers
Function
IsCast
(v Flags)
ch3/netflag/netflag.go:18
↓ 1 callers
Function
Marshal
!+Marshal Marshal encodes a Go value in S-expression form.
ch12/sexpr/encode.go:16
↓ 1 callers
Function
MarshalIndent
(v interface{})
ch12/sexpr/pretty.go:15
↓ 1 callers
Function
PopCount
PopCount returns the population count (number of set bits) of x.
ch2/popcount/main.go:20
↓ 1 callers
Function
PopCountByClearing
(x uint64)
ch2/popcount/popcount_test.go:25
↓ 1 callers
Function
PopCountByShifting
(x uint64)
ch2/popcount/popcount_test.go:34
↓ 1 callers
Function
SetBroadcast
(v *Flags)
ch3/netflag/netflag.go:17
↓ 1 callers
Function
Sort
Sort sorts values in place.
ch4/treesort/sort.go:16
↓ 1 callers
Function
TurnDown
(v *Flags)
ch3/netflag/netflag.go:16
↓ 1 callers
Method
UnionWith
UnionWith sets s to the union of s and t.
ch6/intset/intset.go:38
↓ 1 callers
Function
Unmarshal
!+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 callers
Function
Unpack
!+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 callers
Function
WaitForServer
!+ 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 callers
Method
Write
!- !+write
ch13/bzip-print/bzip2.go:50
↓ 1 callers
Method
Write
(p []byte)
ch7/bytecounter/main.go:17
↓ 1 callers
Function
add
(t *tree, value int)
ch4/treesort/sort.go:35
↓ 1 callers
Function
appendInt
!+append
ch4/append/main.go:32
↓ 1 callers
Function
appendValues
appendValues appends the elements of t to values in order and returns the resulting slice.
ch4/treesort/sort.go:26
↓ 1 callers
Method
baker
(baked chan<- cake)
ch8/cake/cake.go:35
next →
1–100 of 421, ranked by callers