Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Snask
- */
- def såLænge(p: => Boolean)(b: => Unit):Unit = {
- if(p){
- b
- såLænge(p)(b)
- }
- }
- implicit class EkstraInt(i:Int){
- def erMindreEnd(x:Int) = i<x
- }
- /*
- Program
- */
- var i = 0
- såLænge ( i erMindreEnd 10 ) {
- println( i )
- i = i + 1
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement