zenna / Spec.jl

MIT License
4 stars 0 forks source link

Syntax for last method #4

Open zenna opened 4 years ago

zenna commented 4 years ago

Do lookup of last method for shortcut syntax

Instead of

"Body mass index"
bmi(height, weight) = height / weight 
@pre bmi(height, weight) = height > 0 "height must be positive"
@pre bmi(height, weight) = weight > 0 "weight must be positive"

We should be able to write

"Body mass index"
bmi(height, weight) = height / weight 
@pre bmi height > 0 "height must be positive"
@pre bmi weight > 0 "weight must be positive"

Post conditions