SML is odd


(if exp1 then exp2 else exp3) div (if exp4 then exp5 else exp6)

Is valid and for at least some problems, is entirely reasonable.

I think the key to SML, at least so far… *everything* is an expression.  Any complete statement returns a value, and anything that returns a value counts as an expression.  Ok, small exceptions here and there like, well, exceptions, but approaching it with “everything is an expression” has really helped my understanding.

Advertisements

About Annie
Middle age trans girl navigating life and general geekery in the midwest.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: