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
(function :Int maxFromList [ :Array<Int> list] | |
// Looks like variables declared inside `let` are all final. ?? Humn... | |
// Ooooh, you need a `&mut` to indicate mutability. ie. by default all | |
// variables are immutable. | |
(let [&mut :Int maxNumber 0] | |
//lovely almost pythonic syntax | |
(doFor number list | |
(set maxNumber (max maxNumber number)) | |
) | |
maxNumber) |
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
import 'package:flutter/material.dart'; | |
import 'dart:math'; | |
void main() => runApp(HomePage()); | |
class HomePage extends StatefulWidget { | |
@override | |
_HomePageState createState() => _HomePageState(); | |
} |
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
var computerName = "pc"; //Note that not all languages can infer types. |
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
String computerName = "mac"; |