summary refs log tree commit diff stats
path: root/examples/maximum.nim
blob: 3c43a48c9684f5dc5fc4b4cfcc1dfa938562ef74 (plain) (blame)
1
2
3
4
5
6
# Shows how the method call syntax can be used to chain calls conveniently.

import strutils, sequtils

echo "Give a list of numbers (separated by spaces): "
stdin.readLine.split.map(parseInt).max.`$`.echo(" is the maximum!")