Skip to content

Commit

Permalink
Example #8: comparable type set
Browse files Browse the repository at this point in the history
  • Loading branch information
tisnik committed Jun 13, 2022
1 parent 26b1556 commit f7c6b1e
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions lesson8/08_comparable.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// The good old "compare" function defined for one data type.

package main

import "fmt"

func compare(x int, y int) bool {
return x < y
}

func main() {
fmt.Println(compare(1, 2))
}

0 comments on commit f7c6b1e

Please sign in to comment.