add more help text
This commit is contained in:
@@ -89,10 +89,20 @@ func partitions(cmd *cobra.Command, args []string) {
|
||||
|
||||
// partitionsCmd represents the partitions command
|
||||
var partitionsCmd = &cobra.Command{
|
||||
Use: "partitions",
|
||||
Use: "partitions -n N -k N",
|
||||
Short: "Compute the number of partitions of an integer",
|
||||
Long: `Compute the number of partitions of an integer.`,
|
||||
Run: partitions,
|
||||
Long: `Compute the number of partitions of an integer.
|
||||
|
||||
For example, 4 can be partitioned into
|
||||
4
|
||||
3+1
|
||||
2+2
|
||||
2+1+1
|
||||
1+1+1+1
|
||||
so p(n) = 5.
|
||||
|
||||
To compute the number of partitions into at most k parts, provide the -k flag.`,
|
||||
Run: partitions,
|
||||
}
|
||||
|
||||
func init() {
|
||||
|
||||
Reference in New Issue
Block a user