This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.maasfrensch | |
import java.io._ | |
/** | |
* Adds some useful methods to file, to be used implicitely: | |
* implicit def file2enhanced(file:File) = new EnhancedFile(file) | |
* @author [email protected] | |
*/ | |
class EnhancedFile(val file:File) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package euler14 | |
object Main { | |
def isCollatzSerie(n:BigInt, numElements:BigInt):(BigInt, BigInt) = { | |
if(n <= 1) | |
(n, numElements) | |
else if(n%2 == 0) | |
isCollatzSerie(n >> 1, numElements + 1) | |
else |
NewerOlder