Skip to content

Instantly share code, notes, and snippets.

Created July 2, 2010 19:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/461824 to your computer and use it in GitHub Desktop.
Save anonymous/461824 to your computer and use it in GitHub Desktop.
#! /Users/damian/bin/rakudo'
use v6;
use IO::Prompter;
subset Coefficient of Num where 0..1;
prompt -> Num $amount, Coefficient $rate, Int $term, Str $desc where /\S/ {
say "After $term year(s), $amount will be worth ",
$amount * (1+$rate)**$term;
say $desc;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment