add more help text

This commit is contained in:
filifa
2025-09-17 21:02:05 -04:00
parent 4b4858c54f
commit 9e6f648f0b
14 changed files with 126 additions and 42 deletions

View File

@@ -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() {