forked from ankitsindhu/scala-programming
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Module 2.html
43 lines (41 loc) · 153 KB
/
Module 2.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<!DOCTYPE html>
<html>
<head>
<meta name="databricks-html-version" content="1">
<title>Module 2 - Databricks</title>
<meta charset="utf-8">
<meta name="google" content="notranslate">
<meta name="robots" content="nofollow">
<meta http-equiv="Content-Language" content="en">
<meta http-equiv="Content-Type" content="text/html; charset=UTF8">
<link rel="stylesheet"
href="https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700">
<link rel="stylesheet" type="text/css" href="https://databricks-prod-cloudfront.cloud.databricks.com/static/e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855/lib/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="https://databricks-prod-cloudfront.cloud.databricks.com/static/e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855/lib/jquery-ui-bundle/jquery-ui.min.css">
<link rel="stylesheet" type="text/css" href="https://databricks-prod-cloudfront.cloud.databricks.com/static/e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855/css/main.css">
<link rel="stylesheet" href="https://databricks-prod-cloudfront.cloud.databricks.com/static/e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855/css/print.css" media="print">
<link rel="icon" type="image/png" href="https://databricks-prod-cloudfront.cloud.databricks.com/static/e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855/img/favicon.ico"/>
<script>window.settings = {"enableNotebookNotifications":true,"enableSshKeyUI":false,"defaultInteractivePricePerDBU":0.4,"enableOnDemandClusterType":true,"enableAutoCompleteAsYouType":[],"devTierName":"Community Edition","enableJobsPrefetching":true,"workspaceFeaturedLinks":[{"linkURI":"https://docs.databricks.com/index.html","displayName":"Documentation","icon":"question"},{"linkURI":"https://docs.databricks.com/release-notes/product/index.html","displayName":"Release Notes","icon":"code"},{"linkURI":"https://docs.databricks.com/spark/latest/training/index.html","displayName":"Training & Tutorials","icon":"graduation-cap"}],"enableClearStateFeature":true,"enableJobsAclsV2InUI":false,"dbcForumURL":"http://forums.databricks.com/","enableProtoClusterInfoDeltaPublisher":true,"enableAttachExistingCluster":true,"serverlessDefaultSparkVersion":"latest-stable-scala2.11","maxCustomTags":45,"serverlessDefaultMaxWorkers":20,"enableInstanceProfilesUIInJobs":true,"nodeInfo":{"node_types":[{"support_ssh":false,"spark_heap_memory":4800,"instance_type_id":"r3.2xlarge","spark_core_oversubscription_factor":8.0,"node_type_id":"dev-tier-node","description":"Community Optimized","support_cluster_tags":false,"container_memory_mb":6000,"node_instance_type":{"instance_type_id":"r3.2xlarge","provider":"AWS","local_disk_size_gb":160,"compute_units":26.0,"number_of_ips":14,"local_disks":1,"reserved_compute_units":3.64,"gpus":0,"memory_mb":62464,"num_cores":8,"local_disk_type":"AHCI","max_attachable_disks":0,"supported_disk_types":[{"ebs_volume_type":"GENERAL_PURPOSE_SSD"},{"ebs_volume_type":"THROUGHPUT_OPTIMIZED_HDD"}],"reserved_memory_mb":4800},"memory_mb":6144,"is_hidden":false,"category":"Community Edition","num_cores":0.88,"support_port_forwarding":false,"support_ebs_volumes":false,"is_deprecated":false}],"default_node_type_id":"dev-tier-node"},"sqlAclsDisabledMap":{"spark.databricks.acl.enabled":"false","spark.databricks.acl.sqlOnly":"false"},"enableDatabaseSupportClusterChoice":true,"enableClusterAcls":true,"notebookRevisionVisibilityHorizon":999999,"serverlessClusterProductName":"Serverless Pool","enableTableHandler":false,"maxEbsVolumesPerInstance":10,"isAdmin":true,"deltaProcessingBatchSize":1000,"timerUpdateQueueLength":100,"sqlAclsEnabledMap":{"spark.databricks.acl.enabled":"true","spark.databricks.acl.sqlOnly":"true"},"enableLargeResultDownload":true,"maxElasticDiskCapacityGB":5000,"serverlessDefaultMinWorkers":2,"zoneInfos":[{"id":"us-west-2c","isDefault":true},{"id":"us-west-2b","isDefault":false},{"id":"us-west-2a","isDefault":false}],"enableCustomSpotPricingUIByTier":false,"serverlessClustersEnabled":false,"enableFindAndReplace":true,"enableEBSVolumesUIForJobs":true,"enablePublishNotebooks":true,"enableMaxConcurrentRuns":true,"enableJobAclsConfig":false,"enableFullTextSearch":false,"enableElasticSparkUI":false,"enableNewClustersCreate":true,"clusters":true,"allowRunOnPendingClusters":true,"fileStoreBase":"FileStore","enableSshKeyUIInJobs":true,"enableDetachAndAttachSubMenu":true,"configurableSparkOptionsSpec":[{"keyPattern":"spark\\.kryo(\\.[^\\.]+)+","valuePattern":".*","keyPatternDisplay":"spark.kryo.*","valuePatternDisplay":"*","description":"Configuration options for Kryo serialization"},{"keyPattern":"spark\\.io\\.compression\\.codec","valuePattern":"(lzf|snappy|org\\.apache\\.spark\\.io\\.LZFCompressionCodec|org\\.apache\\.spark\\.io\\.SnappyCompressionCodec)","keyPatternDisplay":"spark.io.compression.codec","valuePatternDisplay":"snappy|lzf","description":"The codec used to compress internal data such as RDD partitions, broadcast variables and shuffle outputs."},{"keyPattern":"spark\\.serializer","valuePattern":"(org\\.apache\\.spark\\.serializer\\.JavaSerializer|org\\.apache\\.spark\\.serializer\\.KryoSerializer)","keyPatternDisplay":"spark.serializer","valuePatternDisplay":"org.apache.spark.serializer.JavaSerializer|org.apache.spark.serializer.KryoSerializer","description":"Class to use for serializing objects that will be sent over the network or need to be cached in serialized form."},{"keyPattern":"spark\\.rdd\\.compress","valuePattern":"(true|false)","keyPatternDisplay":"spark.rdd.compress","valuePatternDisplay":"true|false","description":"Whether to compress serialized RDD partitions (e.g. for StorageLevel.MEMORY_ONLY_SER). Can save substantial space at the cost of some extra CPU time."},{"keyPattern":"spark\\.speculation","valuePattern":"(true|false)","keyPatternDisplay":"spark.speculation","valuePatternDisplay":"true|false","description":"Whether to use speculation (recommended off for streaming)"},{"keyPattern":"spark\\.es(\\.[^\\.]+)+","valuePattern":".*","keyPatternDisplay":"spark.es.*","valuePatternDisplay":"*","description":"Configuration options for ElasticSearch"},{"keyPattern":"es(\\.([^\\.]+))+","valuePattern":".*","keyPatternDisplay":"es.*","valuePatternDisplay":"*","description":"Configuration options for ElasticSearch"},{"keyPattern":"spark\\.(storage|shuffle)\\.memoryFraction","valuePattern":"0?\\.0*([1-9])([0-9])*","keyPatternDisplay":"spark.(storage|shuffle).memoryFraction","valuePatternDisplay":"(0.0,1.0)","description":"Fraction of Java heap to use for Spark's shuffle or storage"},{"keyPattern":"spark\\.streaming\\.backpressure\\.enabled","valuePattern":"(true|false)","keyPatternDisplay":"spark.streaming.backpressure.enabled","valuePatternDisplay":"true|false","description":"Enables or disables Spark Streaming's internal backpressure mechanism (since 1.5). This enables the Spark Streaming to control the receiving rate based on the current batch scheduling delays and processing times so that the system receives only as fast as the system can process. Internally, this dynamically sets the maximum receiving rate of receivers. This rate is upper bounded by the values `spark.streaming.receiver.maxRate` and `spark.streaming.kafka.maxRatePerPartition` if they are set."},{"keyPattern":"spark\\.streaming\\.receiver\\.maxRate","valuePattern":"^([0-9]{1,})$","keyPatternDisplay":"spark.streaming.receiver.maxRate","valuePatternDisplay":"numeric","description":"Maximum rate (number of records per second) at which each receiver will receive data. Effectively, each stream will consume at most this number of records per second. Setting this configuration to 0 or a negative number will put no limit on the rate. See the deployment guide in the Spark Streaming programing guide for mode details."},{"keyPattern":"spark\\.streaming\\.kafka\\.maxRatePerPartition","valuePattern":"^([0-9]{1,})$","keyPatternDisplay":"spark.streaming.kafka.maxRatePerPartition","valuePatternDisplay":"numeric","description":"Maximum rate (number of records per second) at which data will be read from each Kafka partition when using the Kafka direct stream API introduced in Spark 1.3. See the Kafka Integration guide for more details."},{"keyPattern":"spark\\.streaming\\.kafka\\.maxRetries","valuePattern":"^([0-9]{1,})$","keyPatternDisplay":"spark.streaming.kafka.maxRetries","valuePatternDisplay":"numeric","description":"Maximum number of consecutive retries the driver will make in order to find the latest offsets on the leader of each partition (a default value of 1 means that the driver will make a maximum of 2 attempts). Only applies to the Kafka direct stream API introduced in Spark 1.3."},{"keyPattern":"spark\\.streaming\\.ui\\.retainedBatches","valuePattern":"^([0-9]{1,})$","keyPatternDisplay":"spark.streaming.ui.retainedBatches","valuePatternDisplay":"numeric","description":"How many batches the Spark Streaming UI and status APIs remember before garbage collecting."}],"enableReactNotebookComments":true,"enableAdminPasswordReset":false,"enableResetPassword":true,"maxClusterTagValueLength":255,"enableJobsSparkUpgrade":true,"perClusterAutoterminationEnabled":false,"enableNotebookCommandNumbers":true,"sparkVersions":[{"key":"1.6.3-db2-hadoop2-scala2.10","displayName":"Spark 1.6.3-db2 (Hadoop 2, Scala 2.10)","packageLabel":"spark-image-aba860a0ffce4f3471fb14aefdcb1d768ac66a53a5ad884c48745ef98aeb9d67","upgradable":true,"deprecated":false,"customerVisible":true},{"key":"2.1.1-db5-scala2.11","displayName":"Spark 2.1.1-db5 (Scala 2.11)","packageLabel":"spark-image-08d9fc1551087e0876236f19640c4a83116b1649f15137427d21c9056656e80e","upgradable":true,"deprecated":false,"customerVisible":false},{"key":"1.6.x-ubuntu15.10","displayName":"Spark 1.6.x (Hadoop 1)","packageLabel":"spark-image-8cea23fb9094e174bf5815d79009f4a8e383eb86cf2909cf6c6434ed8da2a16a","upgradable":true,"deprecated":false,"customerVisible":false},{"key":"1.4.x-ubuntu15.10","displayName":"Spark 1.4.1 (Hadoop 1)","packageLabel":"spark-image-f710650fb8aaade8e4e812368ea87c45cd8cd0b5e6894ca6c94f3354e8daa6dc","upgradable":true,"deprecated":false,"customerVisible":true},{"key":"2.2.x-scala2.11","displayName":"3.0 (includes Apache Spark 2.2.0, Scala 2.11)","packageLabel":"spark-image-67ab3a06d1e83d5b60df7063245eb419a2e9fe329aeeb7e7d9713332c669bb17","upgradable":true,"deprecated":false,"customerVisible":false},{"key":"2.1.1-db6-scala2.10","displayName":"Spark 2.1.1-db6 (Scala 2.10)","packageLabel":"spark-image-177f3f02a6a3432d30068332dc857b9161345bdd2ee8a2d2de05bb05cb4b0f4c","upgradable":true,"deprecated":false,"customerVisible":true},{"key":"2.1.0-db2-scala2.11","displayName":"Spark 2.1.0-db2 (Scala 2.11)","packageLabel":"spark-image-267c4490a3ab8a39acdbbd9f1d36f6decdecebf013e30dd677faff50f1d9cf8b","upgradable":true,"deprecated":false,"customerVisible":false},{"key":"2.1.x-gpu-scala2.11","displayName":"Spark 2.1 (Auto-updating, GPU, Scala 2.11 experimental)","packageLabel":"spark-image-d613235f93e0f29838beb2079a958c02a192ed67a502192bc67a8a5f2fb37f35","upgradable":true,"deprecated":false,"customerVisible":true},{"key":"2.0.0-ubuntu15.10-scala2.10","displayName":"Spark 2.0.0 (Scala 2.10)","packageLabel":"spark-image-073c1b52ace74f251fae2680624a0d8d184a8b57096d1c21c5ce56c29be6a37a","upgradable":true,"deprecated":true,"customerVisible":false},{"key":"2.0.2-db3-scala2.10","displayName":"Spark 2.0.2-db3 (Scala 2.10)","packageLabel":"spark-image-584091dedb690de20e8cf22d9e02fdcce1281edda99eedb441a418d50e28088f","upgradable":true,"deprecated":false,"customerVisible":false},{"key":"latest-experimental-scala2.10","displayName":"Latest experimental (3.2 snapshot, Scala 2.10)","packageLabel":"spark-image-c6944b8b1f552d103c814555f4c68de2a71b97d693255ab1cbe165e78f8c9335","upgradable":true,"deprecated":false,"customerVisible":false},{"key":"2.1.0-db1-scala2.11","displayName":"Spark 2.1.0-db1 (Scala 2.11)","packageLabel":"spark-image-e8ad5b72cf0f899dcf2b4720c1f572ab0e87a311d6113b943b4e1d4a7edb77eb","upgradable":true,"deprecated":true,"customerVisible":false},{"key":"2.1.1-db4-scala2.11","displayName":"Spark 2.1.1-db4 (Scala 2.11)","packageLabel":"spark-image-52bca0ca866e3f4243d3820a783abf3b9b3b553edf234abef14b892657ceaca9","upgradable":true,"deprecated":false,"customerVisible":true},{"key":"latest-stable-scala2.11","displayName":"Latest stable (3.1, Scala 2.11)","packageLabel":"spark-image-662a59231acb79581afea0b3295ad1865e01480f7c96912ddca2e35872247cf4","upgradable":true,"deprecated":false,"customerVisible":false},{"key":"2.1.0-db2-scala2.10","displayName":"Spark 2.1.0-db2 (Scala 2.10)","packageLabel":"spark-image-a2ca4f6b58c95f78dca91b1340305ab3fe32673bd894da2fa8e1dc8a9f8d0478","upgradable":true,"deprecated":false,"customerVisible":false},{"key":"1.6.x-ubuntu15.10-hadoop1","displayName":"Spark 1.6.x (Hadoop 1)","packageLabel":"spark-image-8cea23fb9094e174bf5815d79009f4a8e383eb86cf2909cf6c6434ed8da2a16a","upgradable":true,"deprecated":false,"customerVisible":false},{"key":"2.0.2-db4-scala2.11","displayName":"Spark 2.0.2-db4 (Scala 2.11)","packageLabel":"spark-image-7dbc7583e8271765b8a1508cb9e832768e35489bbde2c4c790bc6766aee2fd7f","upgradable":true,"deprecated":false,"customerVisible":true},{"key":"1.6.1-ubuntu15.10-hadoop1","displayName":"Spark 1.6.1 (Hadoop 1)","packageLabel":"spark-image-21d1cac181b7b8856dd1b4214a3a734f95b5289089349db9d9c926cb87d843db","upgradable":true,"deprecated":true,"customerVisible":false},{"key":"2.0.x-gpu-scala2.11","displayName":"Spark 2.0 (Auto-updating, GPU, Scala 2.11 experimental)","packageLabel":"spark-image-968b89f1d0ec32e1ee4dacd04838cae25ef44370a441224177a37980d539d83a","upgradable":true,"deprecated":false,"customerVisible":true},{"key":"1.6.2-ubuntu15.10-hadoop1","displayName":"Spark 1.6.2 (Hadoop 1)","packageLabel":"spark-image-8cea23fb9094e174bf5815d79009f4a8e383eb86cf2909cf6c6434ed8da2a16a","upgradable":true,"deprecated":true,"customerVisible":false},{"key":"1.6.3-db1-hadoop2-scala2.10","displayName":"Spark 1.6.3-db1 (Hadoop 2, Scala 2.10)","packageLabel":"spark-image-eaa8d9b990015a14e032fb2e2e15be0b8d5af9627cd01d855df728b67969d5d9","upgradable":true,"deprecated":false,"customerVisible":false},{"key":"1.6.3-db2-hadoop1-scala2.10","displayName":"Spark 1.6.3-db2 (Hadoop 1, Scala 2.10)","packageLabel":"spark-image-14112ea0645bea94333a571a150819ce85573cf5541167d905b7e6588645cf3b","upgradable":true,"deprecated":false,"customerVisible":true},{"key":"1.6.2-ubuntu15.10-hadoop2","displayName":"Spark 1.6.2 (Hadoop 2)","packageLabel":"spark-image-161245e66d887cd775e23286a54bab0b146143e1289f25bd1732beac454a1561","upgradable":true,"deprecated":true,"customerVisible":false},{"key":"1.6.1-ubuntu15.10-hadoop2","displayName":"Spark 1.6.1 (Hadoop 2)","packageLabel":"spark-image-4cafdf8bc6cba8edad12f441e3b3f0a8ea27da35c896bc8290e16b41fd15496a","upgradable":true,"deprecated":true,"customerVisible":false},{"key":"2.0.2-db2-scala2.10","displayName":"Spark 2.0.2-db2 (Scala 2.10)","packageLabel":"spark-image-36d48f22cca7a907538e07df71847dd22aaf84a852c2eeea2dcefe24c681602f","upgradable":true,"deprecated":true,"customerVisible":false},{"key":"2.0.x-ubuntu15.10-scala2.11","displayName":"Spark 2.0 (Ubuntu 15.10, Scala 2.11, deprecated)","packageLabel":"spark-image-8e1c50d626a52eac5a6c8129e09ae206ba9890f4523775f77af4ad6d99a64c44","upgradable":true,"deprecated":true,"customerVisible":false},{"key":"2.0.x-scala2.10","displayName":"Spark 2.0 (Auto-updating, Scala 2.10)","packageLabel":"spark-image-859e88079f97f58d50e25163b39a1943d1eeac0b6939c5a65faba986477e311a","upgradable":true,"deprecated":false,"customerVisible":true},{"key":"2.1.1-db4-scala2.10","displayName":"Spark 2.1.1-db4 (Scala 2.10)","packageLabel":"spark-image-c7c0224de396cd1563addc1ae4bca6ba823780b6babe6c3729ddf73008f29ba4","upgradable":true,"deprecated":false,"customerVisible":true},{"key":"latest-stable-scala2.10","displayName":"Latest stable (3.1, Scala 2.10)","packageLabel":"spark-image-7294b60f2d42a06c83c94565552a9b3344b17d092eec3a093b53448a01547155","upgradable":true,"deprecated":false,"customerVisible":false},{"key":"2.0.2-db1-scala2.11","displayName":"Spark 2.0.2-db1 (Scala 2.11)","packageLabel":"spark-image-c2d623f03dd44097493c01aa54a941fc31978ebe6d759b36c75b716b2ff6ab9c","upgradable":true,"deprecated":true,"customerVisible":false},{"key":"2.0.2-db4-scala2.10","displayName":"Spark 2.0.2-db4 (Scala 2.10)","packageLabel":"spark-image-859e88079f97f58d50e25163b39a1943d1eeac0b6939c5a65faba986477e311a","upgradable":true,"deprecated":false,"customerVisible":true},{"key":"2.1.1-db5-scala2.10","displayName":"Spark 2.1.1-db5 (Scala 2.10)","packageLabel":"spark-image-74133df2c13950431298d1cab3e865c191d83ac33648a8590495c52fc644c654","upgradable":true,"deprecated":false,"customerVisible":false},{"key":"1.5.x-ubuntu15.10","displayName":"Spark 1.5.2 (Hadoop 1)","packageLabel":"spark-image-c9d2a8abf41f157a4acc6d52bc721090346f6fea2de356f3a66e388f54481698","upgradable":true,"deprecated":false,"customerVisible":true},{"key":"2.2.x-scala2.10","displayName":"3.0 (includes Apache Spark 2.2.0, Scala 2.10)","packageLabel":"spark-image-d549f2d4a523994ecdf37e531b51d5ec7d8be51534bb0ca5322eaad28ba8f557","upgradable":true,"deprecated":false,"customerVisible":false},{"key":"3.0.x-scala2.11","displayName":"3.0 (includes Apache Spark 2.2.0, Scala 2.11)","packageLabel":"spark-image-67ab3a06d1e83d5b60df7063245eb419a2e9fe329aeeb7e7d9713332c669bb17","upgradable":true,"deprecated":false,"customerVisible":true},{"key":"2.0.x-scala2.11","displayName":"Spark 2.0 (Auto-updating, Scala 2.11)","packageLabel":"spark-image-7dbc7583e8271765b8a1508cb9e832768e35489bbde2c4c790bc6766aee2fd7f","upgradable":true,"deprecated":false,"customerVisible":true},{"key":"2.1.x-scala2.10","displayName":"Spark 2.1 (Auto-updating, Scala 2.10)","packageLabel":"spark-image-177f3f02a6a3432d30068332dc857b9161345bdd2ee8a2d2de05bb05cb4b0f4c","upgradable":true,"deprecated":false,"customerVisible":true},{"key":"3.1.x-scala2.11","displayName":"3.1 (includes Apache Spark 2.2.0, Scala 2.11)","packageLabel":"spark-image-662a59231acb79581afea0b3295ad1865e01480f7c96912ddca2e35872247cf4","upgradable":true,"deprecated":false,"customerVisible":true},{"key":"2.1.0-db3-scala2.10","displayName":"Spark 2.1.0-db3 (Scala 2.10)","packageLabel":"spark-image-25a17d070af155f10c4232dcc6248e36a2eb48c24f8d4fc00f34041b86bd1626","upgradable":true,"deprecated":false,"customerVisible":false},{"key":"2.0.2-db2-scala2.11","displayName":"Spark 2.0.2-db2 (Scala 2.11)","packageLabel":"spark-image-4fa852ba378e97815083b96c9cada7b962a513ec23554a5fc849f7f1dd8c065a","upgradable":true,"deprecated":true,"customerVisible":false},{"key":"3.1.x-scala2.10","displayName":"3.1 (includes Apache Spark 2.2.0, Scala 2.10)","packageLabel":"spark-image-7294b60f2d42a06c83c94565552a9b3344b17d092eec3a093b53448a01547155","upgradable":true,"deprecated":false,"customerVisible":true},{"key":"1.3.x-ubuntu15.10","displayName":"Spark 1.3.0 (Hadoop 1)","packageLabel":"spark-image-40d2842670bc3dc178b14042501847d76171437ccf70613fa397a7a24c48b912","upgradable":true,"deprecated":false,"customerVisible":true},{"key":"2.0.1-db1-scala2.11","displayName":"Spark 2.0.1-db1 (Scala 2.11)","packageLabel":"spark-image-10ab19f634bbfdb860446c326a9f76dc25bfa87de6403b980566279142a289ea","upgradable":true,"deprecated":true,"customerVisible":false},{"key":"2.0.2-db3-scala2.11","displayName":"Spark 2.0.2-db3 (Scala 2.11)","packageLabel":"spark-image-7fd7aaa89d55692e429115ae7eac3b1a1dc4de705d50510995f34306b39c2397","upgradable":true,"deprecated":false,"customerVisible":false},{"key":"2.1.1-db6-scala2.11","displayName":"Spark 2.1.1-db6 (Scala 2.11)","packageLabel":"spark-image-fdad9ef557700d7a8b6bde86feccbcc3c71d1acdc838b0fd299bd19956b1076e","upgradable":true,"deprecated":false,"customerVisible":true},{"key":"1.6.3-db1-hadoop1-scala2.10","displayName":"Spark 1.6.3-db1 (Hadoop 1, Scala 2.10)","packageLabel":"spark-image-d50af1032799546b8ccbeeb76889a20c819ebc2a0e68ea20920cb30d3895d3ae","upgradable":true,"deprecated":false,"customerVisible":false},{"key":"2.0.2-db1-scala2.10","displayName":"Spark 2.0.2-db1 (Scala 2.10)","packageLabel":"spark-image-654bdd6e9bad70079491987d853b4b7abf3b736fff099701501acaabe0e75c41","upgradable":true,"deprecated":true,"customerVisible":false},{"key":"2.0.x-ubuntu15.10","displayName":"Spark 2.0 (Ubuntu 15.10, Scala 2.10, deprecated)","packageLabel":"spark-image-a659f3909d51b38d297b20532fc807ecf708cfb7440ce9b090c406ab0c1e4b7e","upgradable":true,"deprecated":true,"customerVisible":false},{"key":"latest-experimental-scala2.11","displayName":"Latest experimental (3.2 snapshot, Scala 2.11)","packageLabel":"spark-image-a2d3e125bbb1d629f077301da9ea1adac583c747472992bf1f0b933977a00888","upgradable":true,"deprecated":false,"customerVisible":false},{"key":"2.0.1-db1-scala2.10","displayName":"Spark 2.0.1-db1 (Scala 2.10)","packageLabel":"spark-image-5a13c2db3091986a4e7363006cc185c5b1108c7761ef5d0218506cf2e6643840","upgradable":true,"deprecated":true,"customerVisible":false},{"key":"2.1.x-scala2.11","displayName":"Spark 2.1 (Auto-updating, Scala 2.11)","packageLabel":"spark-image-fdad9ef557700d7a8b6bde86feccbcc3c71d1acdc838b0fd299bd19956b1076e","upgradable":true,"deprecated":false,"customerVisible":true},{"key":"2.1.0-db1-scala2.10","displayName":"Spark 2.1.0-db1 (Scala 2.10)","packageLabel":"spark-image-f0ab82a5deb7908e0d159e9af066ba05fb56e1edb35bdad41b7ad2fd62a9b546","upgradable":true,"deprecated":true,"customerVisible":false},{"key":"3.0.x-scala2.10","displayName":"3.0 (includes Apache Spark 2.2.0, Scala 2.10)","packageLabel":"spark-image-d549f2d4a523994ecdf37e531b51d5ec7d8be51534bb0ca5322eaad28ba8f557","upgradable":true,"deprecated":false,"customerVisible":true},{"key":"1.6.0-ubuntu15.10","displayName":"Spark 1.6.0 (Hadoop 1)","packageLabel":"spark-image-10ef758029b8c7e19cd7f4fb52fff9180d75db92ca071bd94c47f3c1171a7cb5","upgradable":true,"deprecated":true,"customerVisible":false},{"key":"1.6.x-ubuntu15.10-hadoop2","displayName":"Spark 1.6.x (Hadoop 2)","packageLabel":"spark-image-161245e66d887cd775e23286a54bab0b146143e1289f25bd1732beac454a1561","upgradable":true,"deprecated":false,"customerVisible":false},{"key":"2.0.0-ubuntu15.10-scala2.11","displayName":"Spark 2.0.0 (Scala 2.11)","packageLabel":"spark-image-b4ec141e751f201399f8358a82efee202560f7ed05e1a04a2ae8778f6324b909","upgradable":true,"deprecated":true,"customerVisible":false},{"key":"2.1.0-db3-scala2.11","displayName":"Spark 2.1.0-db3 (Scala 2.11)","packageLabel":"spark-image-ccbc6b73f158e2001fc1fb8c827bfdde425d8bd6d65cb7b3269784c28bb72c16","upgradable":true,"deprecated":false,"customerVisible":false}],"enableClearStateAndRunAll":true,"enableRestrictedClusterCreation":true,"enableFeedback":true,"enableClusterAutoScaling":false,"enableUserVisibleDefaultTags":true,"defaultNumWorkers":0,"serverContinuationTimeoutMillis":10000,"driverStderrFilePrefix":"stderr","enableNotebookRefresh":false,"accountsOwnerUrl":"https://accounts.cloud.databricks.com/registration.html#login","driverStdoutFilePrefix":"stdout","defaultNodeTypeToPricingUnitsMap":{"r3.2xlarge":2,"i3.4xlarge":6,"class-node":1,"m4.2xlarge":1.5,"r4.xlarge":1,"m4.4xlarge":3,"r4.16xlarge":16,"Standard_DS11":0.5,"p2.8xlarge":16,"m4.10xlarge":8,"r3.8xlarge":8,"r4.4xlarge":4,"dev-tier-node":1,"c3.8xlarge":4,"r3.4xlarge":4,"i2.4xlarge":6,"m4.xlarge":0.75,"r4.8xlarge":8,"r4.large":0.5,"Standard_DS12":1,"development-node":1,"i2.2xlarge":3,"g2.8xlarge":6,"i3.large":0.75,"memory-optimized":1,"m4.large":0.375,"p2.16xlarge":24,"i3.8xlarge":12,"i3.16xlarge":24,"Standard_DS12_v2":1,"Standard_DS13":2,"Standard_DS11_v2":0.5,"Standard_DS13_v2":2,"c3.2xlarge":1,"Standard_L4s":1.5,"c4.2xlarge":1,"i2.xlarge":1.5,"compute-optimized":1,"c4.4xlarge":2,"i3.2xlarge":3,"c3.4xlarge":2,"g2.2xlarge":1.5,"p2.xlarge":2,"m4.16xlarge":12,"c4.8xlarge":4,"i3.xlarge":1.5,"r3.xlarge":1,"r4.2xlarge":2,"i2.8xlarge":12},"enableSparkDocsSearch":true,"sparkHistoryServerEnabled":true,"enableEBSVolumesUI":false,"sanitizeMarkdownHtml":true,"metastoreServiceRowLimit":1000000,"enableIPythonImportExport":true,"enableClusterTagsUIForJobs":true,"enableClusterTagsUI":false,"enableNotebookHistoryDiffing":true,"branch":"2.51","accountsLimit":3,"enableSparkEnvironmentVariables":true,"enableX509Authentication":false,"enableStructuredStreamingNbOptimizations":true,"enableNotebookGitBranching":true,"local":false,"enableNotebookLazyRenderWrapper":false,"enableClusterAutoScalingForJobs":false,"enableStrongPassword":false,"displayDefaultContainerMemoryGB":6,"enableNotebookCommandMode":true,"disableS3TableImport":false,"deploymentMode":"production","useSpotForWorkers":true,"preferStartTerminatedCluster":true,"enableNonPollingTableCall":true,"enableUserInviteWorkflow":true,"enableStaticNotebooks":true,"enableCssTransitions":true,"serverlessEnableElasticDisk":true,"minClusterTagKeyLength":1,"showHomepageFeaturedLinks":true,"pricingURL":"https://databricks.com/product/pricing","enableClusterAclsConfig":false,"useTempS3UrlForTableUpload":false,"notifyLastLogin":false,"enableSshKeyUIByTier":false,"enableCreateClusterOnAttach":true,"defaultAutomatedPricePerDBU":0.2,"enableNotebookGitVersioning":true,"files":"files/","feedbackEmail":"[email protected]","enableDriverLogsUI":true,"enableWorkspaceAclsConfig":false,"dropzoneMaxFileSize":2047,"enableNewClustersList":false,"enableNewDashboardViews":true,"driverLog4jFilePrefix":"log4j","enableSingleSignOn":true,"enableMavenLibraries":true,"displayRowLimit":1000,"deltaProcessingAsyncEnabled":true,"enableSparkEnvironmentVariablesUI":false,"defaultSparkVersion":{"key":"2.1.x-scala2.10","displayName":"Spark 2.1 (Auto-updating, Scala 2.10)","packageLabel":"spark-image-177f3f02a6a3432d30068332dc857b9161345bdd2ee8a2d2de05bb05cb4b0f4c","upgradable":true,"deprecated":false,"customerVisible":true},"enableCustomSpotPricing":false,"enableMountAclsConfig":false,"defaultAutoterminationMin":180,"useDevTierHomePage":true,"enableClusterClone":true,"enableNotebookLineNumbers":true,"enablePublishHub":false,"notebookHubUrl":"http://hub.dev.databricks.com/","showSqlEndpoints":false,"enableNotebookDatasetInfoView":false,"enableClusterAclsByTier":false,"databricksDocsBaseUrl":"https://docs.databricks.com/","cloud":"AWS","disallowAddingAdmins":true,"enableSparkConfUI":true,"featureTier":"DEVELOPER_BASIC_TIER","mavenCentralSearchEndpoint":"http://search.maven.org/solrsearch/select","enableOrgSwitcherUI":true,"clustersLimit":1,"enableJdbcImport":true,"enableElasticDisk":false,"logfiles":"logfiles/","enableRelativeNotebookLinks":true,"enableWebappSharding":true,"enableClusterDeltaUpdates":true,"enableSingleSignOnLogin":false,"ebsVolumeSizeLimitGB":{"GENERAL_PURPOSE_SSD":[100,4096],"THROUGHPUT_OPTIMIZED_HDD":[500,4096]},"enableMountAcls":false,"requireEmailUserName":true,"dbcFeedbackURL":"mailto:[email protected]","enableMountAclService":true,"enableStructuredDataAcls":false,"serverlessClustersByDefault":false,"enableWorkspaceAcls":false,"maxClusterTagKeyLength":127,"gitHash":"edf38246235114c5bcdbe48b410c94e545836029","showWorkspaceFeaturedLinks":true,"signupUrl":"https://databricks.com/try-databricks","allowFeedbackForumAccess":true,"enableImportFromUrl":true,"enableMiniClusters":true,"enableNewJobList":true,"enableNewTableUI":true,"enableDebugUI":false,"enableStreamingMetricsDashboard":true,"allowNonAdminUsers":true,"enableSingleSignOnByTier":false,"enableJobsRetryOnTimeout":true,"useStandardTierUpgradeTooltips":true,"staticNotebookResourceUrl":"https://databricks-prod-cloudfront.cloud.databricks.com/static/e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855/","enableSpotClusterType":true,"enableSparkPackages":true,"dynamicSparkVersions":true,"enableClusterTagsUIByTier":false,"enableNotebookHistoryUI":true,"enableClusterLoggingUI":true,"enableDatabaseDropdownInTableUI":true,"showDebugCounters":false,"enableInstanceProfilesUI":false,"enableFolderHtmlExport":true,"homepageFeaturedLinks":[{"linkURI":"https://docs.databricks.com/_static/notebooks/gentle-introduction-to-apache-spark.html","displayName":"Introduction to Apache Spark on Databricks","icon":"img/home/Python_icon.svg"},{"linkURI":"https://docs.databricks.com/_static/notebooks/databricks-for-data-scientists.html","displayName":"Databricks for Data Scientists","icon":"img/home/Scala_icon.svg"},{"linkURI":"https://docs.databricks.com/_static/notebooks/structured-streaming-python.html","displayName":"Introduction to Structured Streaming","icon":"img/home/Python_icon.svg"}],"enableClusterStart":false,"enableEBSVolumesUIByTier":false,"singleSignOnComingSoon":false,"removeSubCommandCodeWhenExport":true,"upgradeURL":"https://accounts.cloud.databricks.com/registration.html#login","maxAutoterminationMinutes":10000,"autoterminateClustersByDefault":true,"notebookLoadingBackground":"#fff","sshContainerForwardedPort":2200,"enableServerAutoComplete":true,"enableStaticHtmlImport":true,"enableInstanceProfilesByTier":false,"showForgotPasswordLink":true,"defaultMemoryPerContainerMB":6000,"enablePresenceUI":true,"minAutoterminationMinutes":10,"accounts":true,"useOnDemandClustersByDefault":true,"useFramedStaticNotebooks":false,"enableNewProgressReportUI":true,"enableAutoCreateUserUI":true,"defaultCoresPerContainer":4,"showTerminationReason":true,"enableNewClustersGet":true,"showPricePerDBU":false,"showSqlProxyUI":true,"enableNotebookErrorHighlighting":true};</script>
<script>var __DATABRICKS_NOTEBOOK_MODEL = {"version":"NotebookV1","origId":2014922853900798,"name":"Module 2","language":"scala","commands":[{"version":"CommandV1","origId":2014922853900799,"guid":"49041adb-a2ea-4e00-8b19-3463d02293a7","subtype":"command","commandType":"auto","position":1.0,"command":"//Case Classes\n//No need for new()\n//equals \n\ncase class Point(x:Int, y:Int){\n val age: Int = 0;\n val f = ()=>{}\n \n def getSquareString(input: Double): String = {\n val sq = input * input\n sq.toString\n }\n}","commandVersion":0,"state":"finished","results":{"type":"html","data":"<div class=\"ansiout\">defined class Point\n</div>","arguments":{},"addedWidgets":{},"removedWidgets":[],"datasetInfos":[]},"errorSummary":"<div class=\"ansiout\"><console>:8: error: '=' expected but '=>' found.\n def func(x:Int) => { }\n ^\n<console>:9: error: illegal start of simple expression\n }\n ^\n</div>","error":null,"workflows":[],"startTime":1501644185498,"submitTime":1501644185476,"finishTime":1501644185752,"collapsed":false,"bindings":{},"inputWidgets":{},"displayType":"table","width":"auto","height":"auto","xColumns":null,"yColumns":null,"pivotColumns":null,"pivotAggregation":null,"customPlotOptions":{},"commentThread":[],"commentsVisible":false,"parentHierarchy":[],"diffInserts":[],"diffDeletes":[],"globalVars":{},"latestUser":"a user","commandTitle":"","showCommandTitle":false,"hideCommandCode":false,"hideCommandResult":false,"iPythonMetadata":null,"streamStates":{},"nuid":"7074785b-e980-45ea-8b57-3a66b08f759c"},{"version":"CommandV1","origId":2014922853900803,"guid":"96a82c85-73d5-447a-bd35-41a6f957fe72","subtype":"command","commandType":"auto","position":2.0,"command":"val a = Point(1,2)","commandVersion":0,"state":"finished","results":{"type":"html","data":"<div class=\"ansiout\">a: Point = Point(1,2)\n</div>","arguments":{},"addedWidgets":{},"removedWidgets":[],"datasetInfos":[]},"errorSummary":null,"error":null,"workflows":[],"startTime":1501643627996,"submitTime":1501643627980,"finishTime":1501643628141,"collapsed":false,"bindings":{},"inputWidgets":{},"displayType":"table","width":"auto","height":"auto","xColumns":null,"yColumns":null,"pivotColumns":null,"pivotAggregation":null,"customPlotOptions":{},"commentThread":[],"commentsVisible":false,"parentHierarchy":[],"diffInserts":[],"diffDeletes":[],"globalVars":{},"latestUser":"a user","commandTitle":"","showCommandTitle":false,"hideCommandCode":false,"hideCommandResult":false,"iPythonMetadata":null,"streamStates":{},"nuid":"c427db85-78ea-48c1-b83c-d326fe6b8180"},{"version":"CommandV1","origId":2014922853900804,"guid":"10685b48-3105-441b-a52d-08e8dbfd56b6","subtype":"command","commandType":"auto","position":3.0,"command":"val b = Point(1,2)","commandVersion":0,"state":"finished","results":{"type":"html","data":"<div class=\"ansiout\">b: Point = Point(1,2)\n</div>","arguments":{},"addedWidgets":{},"removedWidgets":[],"datasetInfos":[]},"errorSummary":"<div class=\"ansiout\"><console>:33: error: not found: value point\n val b = point(3,4)\n ^\n</div>","error":null,"workflows":[],"startTime":1501643770250,"submitTime":1501643770191,"finishTime":1501643770357,"collapsed":false,"bindings":{},"inputWidgets":{},"displayType":"table","width":"auto","height":"auto","xColumns":null,"yColumns":null,"pivotColumns":null,"pivotAggregation":null,"customPlotOptions":{},"commentThread":[],"commentsVisible":false,"parentHierarchy":[],"diffInserts":[],"diffDeletes":[],"globalVars":{},"latestUser":"a user","commandTitle":"","showCommandTitle":false,"hideCommandCode":false,"hideCommandResult":false,"iPythonMetadata":null,"streamStates":{},"nuid":"0cc1c1bb-5bd7-4ff5-9d2f-834d1ee074f1"},{"version":"CommandV1","origId":2014922853900805,"guid":"68792100-3dc5-4f85-8910-a872c07d60f4","subtype":"command","commandType":"auto","position":4.0,"command":"a == b","commandVersion":0,"state":"finished","results":{"type":"html","data":"<div class=\"ansiout\">res1: Boolean = true\n</div>","arguments":{},"addedWidgets":{},"removedWidgets":[],"datasetInfos":[]},"errorSummary":null,"error":null,"workflows":[],"startTime":1501643775176,"submitTime":1501643775164,"finishTime":1501643775283,"collapsed":false,"bindings":{},"inputWidgets":{},"displayType":"table","width":"auto","height":"auto","xColumns":null,"yColumns":null,"pivotColumns":null,"pivotAggregation":null,"customPlotOptions":{},"commentThread":[],"commentsVisible":false,"parentHierarchy":[],"diffInserts":[],"diffDeletes":[],"globalVars":{},"latestUser":"a user","commandTitle":"","showCommandTitle":false,"hideCommandCode":false,"hideCommandResult":false,"iPythonMetadata":null,"streamStates":{},"nuid":"d0f26d2e-10e9-4bc4-858a-e990d88c640b"},{"version":"CommandV1","origId":2014922853900806,"guid":"d72d541a-cc97-4485-b270-21ec92b03a0e","subtype":"command","commandType":"auto","position":5.0,"command":"class NewPoint( var x:Int, var y:Int){\n //Unit - void return\n def move(dx:Int, dy:Int): Unit = {\n x = x + dx\n y = y + dy\n }\n}","commandVersion":0,"state":"finished","results":{"type":"html","data":"<div class=\"ansiout\">defined class NewPoint\n</div>","arguments":{},"addedWidgets":{},"removedWidgets":[],"datasetInfos":[]},"errorSummary":"<div class=\"ansiout\"><console>:37: error: type mismatch;\n found : Unit\n required: Int\n y = y = dy\n ^\n</div>","error":null,"workflows":[],"startTime":1501644361881,"submitTime":1501644361871,"finishTime":1501644362015,"collapsed":false,"bindings":{},"inputWidgets":{},"displayType":"table","width":"auto","height":"auto","xColumns":null,"yColumns":null,"pivotColumns":null,"pivotAggregation":null,"customPlotOptions":{},"commentThread":[],"commentsVisible":false,"parentHierarchy":[],"diffInserts":[],"diffDeletes":[],"globalVars":{},"latestUser":"a user","commandTitle":"","showCommandTitle":false,"hideCommandCode":false,"hideCommandResult":false,"iPythonMetadata":null,"streamStates":{},"nuid":"a0e77b96-d728-426a-bdc8-3860998a2ada"},{"version":"CommandV1","origId":2014922853900807,"guid":"289d1b97-79c8-4ac2-8753-83c26343d4c8","subtype":"command","commandType":"auto","position":6.0,"command":"val np1 = new NewPoint(2,3)","commandVersion":0,"state":"finished","results":{"type":"html","data":"<div class=\"ansiout\">np1: NewPoint = $iwC$$iwC$$iwC$$iwC$$iwC$$iwC$NewPoint@6dd22138\n</div>","arguments":{},"addedWidgets":{},"removedWidgets":[],"datasetInfos":[]},"errorSummary":null,"error":null,"workflows":[],"startTime":1501644379035,"submitTime":1501644379023,"finishTime":1501644379161,"collapsed":false,"bindings":{},"inputWidgets":{},"displayType":"table","width":"auto","height":"auto","xColumns":null,"yColumns":null,"pivotColumns":null,"pivotAggregation":null,"customPlotOptions":{},"commentThread":[],"commentsVisible":false,"parentHierarchy":[],"diffInserts":[],"diffDeletes":[],"globalVars":{},"latestUser":"a user","commandTitle":"","showCommandTitle":false,"hideCommandCode":false,"hideCommandResult":false,"iPythonMetadata":null,"streamStates":{},"nuid":"324811ca-6a0d-41f0-8740-8e2e335607ee"},{"version":"CommandV1","origId":2014922853900808,"guid":"9861cc39-a6b6-4711-9b07-a52479770419","subtype":"command","commandType":"auto","position":7.0,"command":"np1.x","commandVersion":0,"state":"finished","results":{"type":"html","data":"<div class=\"ansiout\">res2: Int = 2\n</div>","arguments":{},"addedWidgets":{},"removedWidgets":[],"datasetInfos":[]},"errorSummary":null,"error":null,"workflows":[],"startTime":1501644390826,"submitTime":1501644390813,"finishTime":1501644390945,"collapsed":false,"bindings":{},"inputWidgets":{},"displayType":"table","width":"auto","height":"auto","xColumns":null,"yColumns":null,"pivotColumns":null,"pivotAggregation":null,"customPlotOptions":{},"commentThread":[],"commentsVisible":false,"parentHierarchy":[],"diffInserts":[],"diffDeletes":[],"globalVars":{},"latestUser":"a user","commandTitle":"","showCommandTitle":false,"hideCommandCode":false,"hideCommandResult":false,"iPythonMetadata":null,"streamStates":{},"nuid":"f71b77a7-cd79-43e5-b6e7-2c4b59cedb6a"},{"version":"CommandV1","origId":2014922853900809,"guid":"f4cc5887-1788-4104-82a8-5cfa513bac75","subtype":"command","commandType":"auto","position":8.0,"command":"np1.y","commandVersion":0,"state":"finished","results":{"type":"html","data":"<div class=\"ansiout\">res3: Int = 3\n</div>","arguments":{},"addedWidgets":{},"removedWidgets":[],"datasetInfos":[]},"errorSummary":null,"error":null,"workflows":[],"startTime":1501644397889,"submitTime":1501644397873,"finishTime":1501644397977,"collapsed":false,"bindings":{},"inputWidgets":{},"displayType":"table","width":"auto","height":"auto","xColumns":null,"yColumns":null,"pivotColumns":null,"pivotAggregation":null,"customPlotOptions":{},"commentThread":[],"commentsVisible":false,"parentHierarchy":[],"diffInserts":[],"diffDeletes":[],"globalVars":{},"latestUser":"a user","commandTitle":"","showCommandTitle":false,"hideCommandCode":false,"hideCommandResult":false,"iPythonMetadata":null,"streamStates":{},"nuid":"b3c4fe01-57c2-43fd-8185-ba1fa4d32ac2"},{"version":"CommandV1","origId":2014922853900810,"guid":"fe4fe3ce-5886-48e4-b28e-30a2499034e2","subtype":"command","commandType":"auto","position":9.0,"command":"class NewPoint( var x:Int = 10, var y:Int = 20){\n //Unit - void return\n def move(dx:Int, dy:Int): Unit = {\n x = x + dx\n y = y + dy\n }\n}","commandVersion":0,"state":"finished","results":{"type":"html","data":"<div class=\"ansiout\">defined class NewPoint\n</div>","arguments":{},"addedWidgets":{},"removedWidgets":[],"datasetInfos":[]},"errorSummary":null,"error":null,"workflows":[],"startTime":1501644440035,"submitTime":1501644440022,"finishTime":1501644440156,"collapsed":false,"bindings":{},"inputWidgets":{},"displayType":"table","width":"auto","height":"auto","xColumns":null,"yColumns":null,"pivotColumns":null,"pivotAggregation":null,"customPlotOptions":{},"commentThread":[],"commentsVisible":false,"parentHierarchy":[],"diffInserts":[],"diffDeletes":[],"globalVars":{},"latestUser":"a user","commandTitle":"","showCommandTitle":false,"hideCommandCode":false,"hideCommandResult":false,"iPythonMetadata":null,"streamStates":{},"nuid":"d74112ee-4e44-44db-9dd4-4339912951f5"},{"version":"CommandV1","origId":2014922853900811,"guid":"16972672-21b2-4473-bf10-d5fab902a405","subtype":"command","commandType":"auto","position":10.0,"command":"val np2 = new NewPoint()","commandVersion":0,"state":"finished","results":{"type":"html","data":"<div class=\"ansiout\">np2: NewPoint = $iwC$$iwC$$iwC$$iwC$$iwC$$iwC$NewPoint@1c29c4ba\n</div>","arguments":{},"addedWidgets":{},"removedWidgets":[],"datasetInfos":[]},"errorSummary":null,"error":null,"workflows":[],"startTime":1501644455696,"submitTime":1501644455683,"finishTime":1501644455816,"collapsed":false,"bindings":{},"inputWidgets":{},"displayType":"table","width":"auto","height":"auto","xColumns":null,"yColumns":null,"pivotColumns":null,"pivotAggregation":null,"customPlotOptions":{},"commentThread":[],"commentsVisible":false,"parentHierarchy":[],"diffInserts":[],"diffDeletes":[],"globalVars":{},"latestUser":"a user","commandTitle":"","showCommandTitle":false,"hideCommandCode":false,"hideCommandResult":false,"iPythonMetadata":null,"streamStates":{},"nuid":"72cb1d1d-5678-4201-821e-b3766201bf8f"},{"version":"CommandV1","origId":2014922853900812,"guid":"7c983558-c465-45df-b498-4270c6901cc7","subtype":"command","commandType":"auto","position":11.0,"command":"np2.x","commandVersion":0,"state":"finished","results":{"type":"html","data":"<div class=\"ansiout\">res4: Int = 10\n</div>","arguments":{},"addedWidgets":{},"removedWidgets":[],"datasetInfos":[]},"errorSummary":null,"error":null,"workflows":[],"startTime":1501644464195,"submitTime":1501644464182,"finishTime":1501644464304,"collapsed":false,"bindings":{},"inputWidgets":{},"displayType":"table","width":"auto","height":"auto","xColumns":null,"yColumns":null,"pivotColumns":null,"pivotAggregation":null,"customPlotOptions":{},"commentThread":[],"commentsVisible":false,"parentHierarchy":[],"diffInserts":[],"diffDeletes":[],"globalVars":{},"latestUser":"a user","commandTitle":"","showCommandTitle":false,"hideCommandCode":false,"hideCommandResult":false,"iPythonMetadata":null,"streamStates":{},"nuid":"fadd91ec-48ad-4e1d-bb63-99af4f0c51a7"},{"version":"CommandV1","origId":2014922853900813,"guid":"5bd778a0-1ac8-4e72-ad95-85f49982c14a","subtype":"command","commandType":"auto","position":12.0,"command":"np2.y","commandVersion":0,"state":"finished","results":{"type":"html","data":"<div class=\"ansiout\">res5: Int = 20\n</div>","arguments":{},"addedWidgets":{},"removedWidgets":[],"datasetInfos":[]},"errorSummary":null,"error":null,"workflows":[],"startTime":1501644469188,"submitTime":1501644469176,"finishTime":1501644469283,"collapsed":false,"bindings":{},"inputWidgets":{},"displayType":"table","width":"auto","height":"auto","xColumns":null,"yColumns":null,"pivotColumns":null,"pivotAggregation":null,"customPlotOptions":{},"commentThread":[],"commentsVisible":false,"parentHierarchy":[],"diffInserts":[],"diffDeletes":[],"globalVars":{},"latestUser":"a user","commandTitle":"","showCommandTitle":false,"hideCommandCode":false,"hideCommandResult":false,"iPythonMetadata":null,"streamStates":{},"nuid":"8d483a25-ebc5-498b-9c40-ccced664ab16"},{"version":"CommandV1","origId":2014922853900814,"guid":"6b9f43c6-a159-48db-8143-b6f26160439c","subtype":"command","commandType":"auto","position":13.0,"command":"%md\n<h2>Private Members and Getter/Setter Syntex</h2>","commandVersion":0,"state":"finished","results":null,"errorSummary":null,"error":null,"workflows":[],"startTime":0,"submitTime":0,"finishTime":0,"collapsed":false,"bindings":{},"inputWidgets":{},"displayType":"table","width":"auto","height":"auto","xColumns":null,"yColumns":null,"pivotColumns":null,"pivotAggregation":null,"customPlotOptions":{},"commentThread":[],"commentsVisible":false,"parentHierarchy":[],"diffInserts":[],"diffDeletes":[],"globalVars":{},"latestUser":"a user","commandTitle":"","showCommandTitle":false,"hideCommandCode":false,"hideCommandResult":false,"iPythonMetadata":null,"streamStates":{},"nuid":"0b636df4-7ddf-4fd0-8acf-27872c6c4207"},{"version":"CommandV1","origId":2014922853900815,"guid":"0f7f2f5c-92c4-4ff6-85f2-5c71b5798885","subtype":"command","commandType":"auto","position":14.0,"command":"class GoodPoint {\n private var _x = 0\n private var _y = 0\n private val bound = 100\n \n //Append _ after getter to create a setter\n \n def x = _x // accessing _x private variable\n def x_= (newValue: Int): Unit = {\n if (newValue < bound) _x = newValue else printWarning\n }\n \n def y = _y // accessing _y private variable\n def y_= (newValue: Int): Unit = {\n if (newValue < bound) _y = newValue else printWarning\n }\n private def printWarning = println(\"WARNING: Out of bounds\")\n}","commandVersion":0,"state":"finished","results":{"type":"html","data":"<div class=\"ansiout\">defined class GoodPoint\n</div>","arguments":{},"addedWidgets":{},"removedWidgets":[],"datasetInfos":[]},"errorSummary":"<div class=\"ansiout\"><console>:12: error: ';' expected but 'else' found.\n f (newValue < bound) _x = newValue else printWarning\n ^\n</div>","error":null,"workflows":[],"startTime":1501646754949,"submitTime":1501646754937,"finishTime":1501646755021,"collapsed":false,"bindings":{},"inputWidgets":{},"displayType":"table","width":"auto","height":"auto","xColumns":null,"yColumns":null,"pivotColumns":null,"pivotAggregation":null,"customPlotOptions":{},"commentThread":[],"commentsVisible":false,"parentHierarchy":[],"diffInserts":[],"diffDeletes":[],"globalVars":{},"latestUser":"a user","commandTitle":"","showCommandTitle":false,"hideCommandCode":false,"hideCommandResult":false,"iPythonMetadata":null,"streamStates":{},"nuid":"5fab0614-8503-47c2-bf42-15a037ebf2f9"},{"version":"CommandV1","origId":2014922853900816,"guid":"e2b95882-69ad-4fa5-8f50-622fdc5f296d","subtype":"command","commandType":"auto","position":15.0,"command":"val p1 = new GoodPoint","commandVersion":0,"state":"finished","results":{"type":"html","data":"<div class=\"ansiout\">p1: GoodPoint = $iwC$$iwC$$iwC$$iwC$$iwC$$iwC$GoodPoint@41037625\n</div>","arguments":{},"addedWidgets":{},"removedWidgets":[],"datasetInfos":[]},"errorSummary":null,"error":null,"workflows":[],"startTime":1501646460692,"submitTime":1501646460678,"finishTime":1501646460777,"collapsed":false,"bindings":{},"inputWidgets":{},"displayType":"table","width":"auto","height":"auto","xColumns":null,"yColumns":null,"pivotColumns":null,"pivotAggregation":null,"customPlotOptions":{},"commentThread":[],"commentsVisible":false,"parentHierarchy":[],"diffInserts":[],"diffDeletes":[],"globalVars":{},"latestUser":"a user","commandTitle":"","showCommandTitle":false,"hideCommandCode":false,"hideCommandResult":false,"iPythonMetadata":null,"streamStates":{},"nuid":"ef74221e-c79a-4894-a4ba-5f9d9a099ac2"},{"version":"CommandV1","origId":978354713624995,"guid":"78a85577-c552-4d85-b842-95b2f709e678","subtype":"command","commandType":"auto","position":16.0,"command":"p1.x = 99\np1.y = 101","commandVersion":0,"state":"finished","results":{"type":"html","data":"<div class=\"ansiout\">WARNING: Out of bounds\np1.x: Int = 99\np1.y: Int = 0\n</div>","arguments":{},"addedWidgets":{},"removedWidgets":[],"datasetInfos":[]},"errorSummary":"<div class=\"ansiout\"><console>:38: error: not found: value p\nval $ires8 = p.x\n ^\n<console>:39: error: not found: value p\nval $ires9 = p.y\n ^\n<console>:33: error: not found: value p\n p.x = 99\n ^\n<console>:34: error: not found: value p\n p.y = 101\n ^\n</div>","error":null,"workflows":[],"startTime":1501646489985,"submitTime":1501646489972,"finishTime":1501646490062,"collapsed":false,"bindings":{},"inputWidgets":{},"displayType":"table","width":"auto","height":"auto","xColumns":null,"yColumns":null,"pivotColumns":null,"pivotAggregation":null,"customPlotOptions":{},"commentThread":[],"commentsVisible":false,"parentHierarchy":[],"diffInserts":[],"diffDeletes":[],"globalVars":{},"latestUser":"a user","commandTitle":"","showCommandTitle":false,"hideCommandCode":false,"hideCommandResult":false,"iPythonMetadata":null,"streamStates":{},"nuid":"7e699331-0fbb-422d-be30-1599f7b068c4"},{"version":"CommandV1","origId":978354713624996,"guid":"32befa1c-e844-41c9-b678-5e24b3ede88c","subtype":"command","commandType":"auto","position":17.0,"command":"p1.x","commandVersion":0,"state":"finished","results":{"type":"html","data":"<div class=\"ansiout\">res8: Int = 99\n</div>","arguments":{},"addedWidgets":{},"removedWidgets":[],"datasetInfos":[]},"errorSummary":"<div class=\"ansiout\"><console>:35: error: not found: value p\n p.x\n ^\n</div>","error":null,"workflows":[],"startTime":1501646626340,"submitTime":1501646626332,"finishTime":1501646626408,"collapsed":false,"bindings":{},"inputWidgets":{},"displayType":"table","width":"auto","height":"auto","xColumns":null,"yColumns":null,"pivotColumns":null,"pivotAggregation":null,"customPlotOptions":{},"commentThread":[],"commentsVisible":false,"parentHierarchy":[],"diffInserts":[],"diffDeletes":[],"globalVars":{},"latestUser":"a user","commandTitle":"","showCommandTitle":false,"hideCommandCode":false,"hideCommandResult":false,"iPythonMetadata":null,"streamStates":{},"nuid":"38e13796-14dc-43c3-bf28-a300934e56ff"},{"version":"CommandV1","origId":978354713624997,"guid":"19b18a6b-8123-410c-955a-6600a2070afe","subtype":"command","commandType":"auto","position":18.0,"command":"%md\n<h2>Traits</h2>","commandVersion":0,"state":"finished","results":null,"errorSummary":null,"error":null,"workflows":[],"startTime":0,"submitTime":0,"finishTime":0,"collapsed":false,"bindings":{},"inputWidgets":{},"displayType":"table","width":"auto","height":"auto","xColumns":null,"yColumns":null,"pivotColumns":null,"pivotAggregation":null,"customPlotOptions":{},"commentThread":[],"commentsVisible":false,"parentHierarchy":[],"diffInserts":[],"diffDeletes":[],"globalVars":{},"latestUser":"a user","commandTitle":"","showCommandTitle":false,"hideCommandCode":false,"hideCommandResult":false,"iPythonMetadata":null,"streamStates":{},"nuid":"75246eb7-9040-4cd1-aba9-24b463f3b2d6"},{"version":"CommandV1","origId":978354713624998,"guid":"1f139bea-dc11-4010-9884-c8318b92aae6","subtype":"command","commandType":"auto","position":19.0,"command":"//whatever trait mandates,\ntrait Pet {\n val name: String\n}","commandVersion":0,"state":"finished","results":{"type":"html","data":"<div class=\"ansiout\">defined trait Pet\n</div>","arguments":{},"addedWidgets":{},"removedWidgets":[],"datasetInfos":[]},"errorSummary":null,"error":null,"workflows":[],"startTime":1501646856504,"submitTime":1501646856496,"finishTime":1501646856571,"collapsed":false,"bindings":{},"inputWidgets":{},"displayType":"table","width":"auto","height":"auto","xColumns":null,"yColumns":null,"pivotColumns":null,"pivotAggregation":null,"customPlotOptions":{},"commentThread":[],"commentsVisible":false,"parentHierarchy":[],"diffInserts":[],"diffDeletes":[],"globalVars":{},"latestUser":"a user","commandTitle":"","showCommandTitle":false,"hideCommandCode":false,"hideCommandResult":false,"iPythonMetadata":null,"streamStates":{},"nuid":"576a7ceb-3f67-4a90-8f7e-a0dc3a734439"},{"version":"CommandV1","origId":978354713624999,"guid":"93e585b8-dfac-4238-9ec5-8cbdcd14ccfc","subtype":"command","commandType":"auto","position":20.0,"command":"class Cat(val name: String) extends Pet\nclass Dog(val name: String) extends Pet","commandVersion":0,"state":"finished","results":{"type":"html","data":"<div class=\"ansiout\">defined class Cat\ndefined class Dog\n</div>","arguments":{},"addedWidgets":{},"removedWidgets":[],"datasetInfos":[]},"errorSummary":"<div class=\"ansiout\"><console>:36: error: class Dog needs to be abstract, since value name in trait Pet of type String is not defined\n class Dog() extends Pet\n ^\n</div>","error":null,"workflows":[],"startTime":1501646973065,"submitTime":1501646973055,"finishTime":1501646973178,"collapsed":false,"bindings":{},"inputWidgets":{},"displayType":"table","width":"auto","height":"auto","xColumns":null,"yColumns":null,"pivotColumns":null,"pivotAggregation":null,"customPlotOptions":{},"commentThread":[],"commentsVisible":false,"parentHierarchy":[],"diffInserts":[],"diffDeletes":[],"globalVars":{},"latestUser":"a user","commandTitle":"","showCommandTitle":false,"hideCommandCode":false,"hideCommandResult":false,"iPythonMetadata":null,"streamStates":{},"nuid":"abc4491e-e8eb-4c6a-a825-848d4a3c4e7a"},{"version":"CommandV1","origId":978354713625000,"guid":"19554b6b-8084-4a97-9694-c951211d9fe3","subtype":"command","commandType":"auto","position":21.0,"command":"val cat = new Cat(\"Catty\")\nval dog = new Dog(\"Doggy\")","commandVersion":0,"state":"finished","results":{"type":"html","data":"<div class=\"ansiout\">cat: Cat = $iwC$$iwC$$iwC$$iwC$$iwC$$iwC$Cat@3af9443e\ndog: Dog = $iwC$$iwC$$iwC$$iwC$$iwC$$iwC$Dog@1ef71925\n</div>","arguments":{},"addedWidgets":{},"removedWidgets":[],"datasetInfos":[]},"errorSummary":null,"error":null,"workflows":[],"startTime":1501647134468,"submitTime":1501647134456,"finishTime":1501647134551,"collapsed":false,"bindings":{},"inputWidgets":{},"displayType":"table","width":"auto","height":"auto","xColumns":null,"yColumns":null,"pivotColumns":null,"pivotAggregation":null,"customPlotOptions":{},"commentThread":[],"commentsVisible":false,"parentHierarchy":[],"diffInserts":[],"diffDeletes":[],"globalVars":{},"latestUser":"a user","commandTitle":"","showCommandTitle":false,"hideCommandCode":false,"hideCommandResult":false,"iPythonMetadata":null,"streamStates":{},"nuid":"b6e16e5f-afec-4e3e-99b1-0e781b2bcf9c"},{"version":"CommandV1","origId":978354713625001,"guid":"198d006f-cdda-456a-ba66-c6c720c2e2b6","subtype":"command","commandType":"auto","position":22.0,"command":"import scala.collection.mutable.ArrayBuffer\n\nval animals = ArrayBuffer.empty[Pet]\nanimals.append(cat)\nanimals.append(dog)","commandVersion":0,"state":"finished","results":{"type":"html","data":"<div class=\"ansiout\">import scala.collection.mutable.ArrayBuffer\nanimals: scala.collection.mutable.ArrayBuffer[Pet] = ArrayBuffer($iwC$$iwC$$iwC$$iwC$$iwC$$iwC$Cat@3af9443e, $iwC$$iwC$$iwC$$iwC$$iwC$$iwC$Dog@1ef71925)\n</div>","arguments":{},"addedWidgets":{},"removedWidgets":[],"datasetInfos":[]},"errorSummary":"<div class=\"ansiout\"><console>:48: error: not found: value dof\n animals.append(dof)\n ^\n</div>","error":null,"workflows":[],"startTime":1501647240132,"submitTime":1501647240124,"finishTime":1501647240255,"collapsed":false,"bindings":{},"inputWidgets":{},"displayType":"table","width":"auto","height":"auto","xColumns":null,"yColumns":null,"pivotColumns":null,"pivotAggregation":null,"customPlotOptions":{},"commentThread":[],"commentsVisible":false,"parentHierarchy":[],"diffInserts":[],"diffDeletes":[],"globalVars":{},"latestUser":"a user","commandTitle":"","showCommandTitle":false,"hideCommandCode":false,"hideCommandResult":false,"iPythonMetadata":null,"streamStates":{},"nuid":"7ca79559-b023-4fff-b338-1ee8ebac5a13"},{"version":"CommandV1","origId":978354713625002,"guid":"60b5c74c-c6d6-4af5-87c9-79bfb796da66","subtype":"command","commandType":"auto","position":23.0,"command":"%md\n<h3>Class Composition with Mixins</h3>","commandVersion":0,"state":"finished","results":null,"errorSummary":null,"error":null,"workflows":[],"startTime":0,"submitTime":0,"finishTime":0,"collapsed":false,"bindings":{},"inputWidgets":{},"displayType":"table","width":"auto","height":"auto","xColumns":null,"yColumns":null,"pivotColumns":null,"pivotAggregation":null,"customPlotOptions":{},"commentThread":[],"commentsVisible":false,"parentHierarchy":[],"diffInserts":[],"diffDeletes":[],"globalVars":{},"latestUser":"a user","commandTitle":"","showCommandTitle":false,"hideCommandCode":false,"hideCommandResult":false,"iPythonMetadata":null,"streamStates":{},"nuid":"a1659bf8-bd11-4fe2-bed4-24293f16a644"},{"version":"CommandV1","origId":2229507819204122,"guid":"f4810840-5add-45df-96a9-b4b4d3da753e","subtype":"command","commandType":"auto","position":24.0,"command":"abstract class A {\n val message: String\n}\n\nclass B extends A {\n val message = \"I'm an instance of class B\"\n}\n\n//mixin - trait extends class & member information of the class becomes available\ntrait C extends A {\n def loudMessage = message.toUpperCase()\n}\n\nclass D extends B with C","commandVersion":0,"state":"finished","results":{"type":"html","data":"<div class=\"ansiout\">defined class A\ndefined class B\ndefined trait C\ndefined class D\n</div>","arguments":{},"addedWidgets":{},"removedWidgets":[],"datasetInfos":[]},"errorSummary":null,"error":null,"workflows":[],"startTime":1501817534700,"submitTime":1501817519826,"finishTime":1501817542022,"collapsed":false,"bindings":{},"inputWidgets":{},"displayType":"table","width":"auto","height":"auto","xColumns":null,"yColumns":null,"pivotColumns":null,"pivotAggregation":null,"customPlotOptions":{},"commentThread":[],"commentsVisible":false,"parentHierarchy":[],"diffInserts":[],"diffDeletes":[],"globalVars":{},"latestUser":"a user","commandTitle":"","showCommandTitle":false,"hideCommandCode":false,"hideCommandResult":false,"iPythonMetadata":null,"streamStates":{},"nuid":"b82e9d58-ff1a-4d17-b1da-2160003e6fa7"},{"version":"CommandV1","origId":2229507819204125,"guid":"c277fde1-9ea7-4367-83c6-68f0371f5c5c","subtype":"command","commandType":"auto","position":25.0,"command":"val d = new D","commandVersion":0,"state":"finished","results":{"type":"html","data":"<div class=\"ansiout\">d: D = $iwC$$iwC$$iwC$$iwC$$iwC$$iwC$D@530e8358\n</div>","arguments":{},"addedWidgets":{},"removedWidgets":[],"datasetInfos":[]},"errorSummary":null,"error":null,"workflows":[],"startTime":1501817565244,"submitTime":1501817565227,"finishTime":1501817565482,"collapsed":false,"bindings":{},"inputWidgets":{},"displayType":"table","width":"auto","height":"auto","xColumns":null,"yColumns":null,"pivotColumns":null,"pivotAggregation":null,"customPlotOptions":{},"commentThread":[],"commentsVisible":false,"parentHierarchy":[],"diffInserts":[],"diffDeletes":[],"globalVars":{},"latestUser":"a user","commandTitle":"","showCommandTitle":false,"hideCommandCode":false,"hideCommandResult":false,"iPythonMetadata":null,"streamStates":{},"nuid":"120fb89a-2c3c-4547-a963-58684cb905ca"},{"version":"CommandV1","origId":2229507819204126,"guid":"3cf8fe29-5158-42ab-a253-984686c68067","subtype":"command","commandType":"auto","position":26.0,"command":"d.message","commandVersion":0,"state":"finished","results":{"type":"html","data":"<div class=\"ansiout\">res0: String = I'm an instance of class B\n</div>","arguments":{},"addedWidgets":{},"removedWidgets":[],"datasetInfos":[]},"errorSummary":null,"error":null,"workflows":[],"startTime":1501817576608,"submitTime":1501817576592,"finishTime":1501817576861,"collapsed":false,"bindings":{},"inputWidgets":{},"displayType":"table","width":"auto","height":"auto","xColumns":null,"yColumns":null,"pivotColumns":null,"pivotAggregation":null,"customPlotOptions":{},"commentThread":[],"commentsVisible":false,"parentHierarchy":[],"diffInserts":[],"diffDeletes":[],"globalVars":{},"latestUser":"a user","commandTitle":"","showCommandTitle":false,"hideCommandCode":false,"hideCommandResult":false,"iPythonMetadata":null,"streamStates":{},"nuid":"72363e68-d18e-4465-a668-1491b3c9393c"},{"version":"CommandV1","origId":2229507819204127,"guid":"04861273-0785-4999-a39f-e229a3ac7c0f","subtype":"command","commandType":"auto","position":27.0,"command":"d.loudMessage","commandVersion":0,"state":"finished","results":{"type":"html","data":"<div class=\"ansiout\">res1: String = I'M AN INSTANCE OF CLASS B\n</div>","arguments":{},"addedWidgets":{},"removedWidgets":[],"datasetInfos":[]},"errorSummary":null,"error":null,"workflows":[],"startTime":1501817595817,"submitTime":1501817595802,"finishTime":1501817595961,"collapsed":false,"bindings":{},"inputWidgets":{},"displayType":"table","width":"auto","height":"auto","xColumns":null,"yColumns":null,"pivotColumns":null,"pivotAggregation":null,"customPlotOptions":{},"commentThread":[],"commentsVisible":false,"parentHierarchy":[],"diffInserts":[],"diffDeletes":[],"globalVars":{},"latestUser":"a user","commandTitle":"","showCommandTitle":false,"hideCommandCode":false,"hideCommandResult":false,"iPythonMetadata":null,"streamStates":{},"nuid":"4bd5c01d-ca11-4b8f-97b9-722adfba4725"},{"version":"CommandV1","origId":2229507819204128,"guid":"8b44abb6-ec4a-45a1-8514-751721263b63","subtype":"command","commandType":"auto","position":28.0,"command":"//Higher Order Functions\n//Takes other functions as parameters or result is a function.","commandVersion":0,"state":"finished","results":{"type":"html","data":"<div class=\"ansiout\"></div>","arguments":{},"addedWidgets":{},"removedWidgets":[],"datasetInfos":[]},"errorSummary":null,"error":null,"workflows":[],"startTime":1501817908589,"submitTime":1501817908574,"finishTime":1501817908703,"collapsed":false,"bindings":{},"inputWidgets":{},"displayType":"table","width":"auto","height":"auto","xColumns":null,"yColumns":null,"pivotColumns":null,"pivotAggregation":null,"customPlotOptions":{},"commentThread":[],"commentsVisible":false,"parentHierarchy":[],"diffInserts":[],"diffDeletes":[],"globalVars":{},"latestUser":"a user","commandTitle":"","showCommandTitle":false,"hideCommandCode":false,"hideCommandResult":false,"iPythonMetadata":null,"streamStates":{},"nuid":"c68635ab-0f81-4845-b86e-ae5df8780baa"},{"version":"CommandV1","origId":2229507819204129,"guid":"b25b5f24-135d-4897-b619-8d95982144c8","subtype":"command","commandType":"auto","position":29.0,"command":"def apply(f: Int => String, v: Int) = f(v)","commandVersion":0,"state":"finished","results":{"type":"html","data":"<div class=\"ansiout\">apply: (f: Int => String, v: Int)String\n</div>","arguments":{},"addedWidgets":{},"removedWidgets":[],"datasetInfos":[]},"errorSummary":null,"error":null,"workflows":[],"startTime":1501817937964,"submitTime":1501817937950,"finishTime":1501817938219,"collapsed":false,"bindings":{},"inputWidgets":{},"displayType":"table","width":"auto","height":"auto","xColumns":null,"yColumns":null,"pivotColumns":null,"pivotAggregation":null,"customPlotOptions":{},"commentThread":[],"commentsVisible":false,"parentHierarchy":[],"diffInserts":[],"diffDeletes":[],"globalVars":{},"latestUser":"a user","commandTitle":"","showCommandTitle":false,"hideCommandCode":false,"hideCommandResult":false,"iPythonMetadata":null,"streamStates":{},"nuid":"eb28d0e2-ddb4-4758-93e3-c3d88daefedd"},{"version":"CommandV1","origId":2229507819204130,"guid":"5b0d75ce-6a47-49ec-8823-75a9299b52da","subtype":"command","commandType":"auto","position":30.0,"command":"apply((x:Int)=> \"Hello\", 6)","commandVersion":0,"state":"finished","results":{"type":"html","data":"<div class=\"ansiout\">res4: String = Hello\n</div>","arguments":{},"addedWidgets":{},"removedWidgets":[],"datasetInfos":[]},"errorSummary":null,"error":null,"workflows":[],"startTime":1501817963993,"submitTime":1501817963979,"finishTime":1501817964229,"collapsed":false,"bindings":{},"inputWidgets":{},"displayType":"table","width":"auto","height":"auto","xColumns":null,"yColumns":null,"pivotColumns":null,"pivotAggregation":null,"customPlotOptions":{},"commentThread":[],"commentsVisible":false,"parentHierarchy":[],"diffInserts":[],"diffDeletes":[],"globalVars":{},"latestUser":"a user","commandTitle":"","showCommandTitle":false,"hideCommandCode":false,"hideCommandResult":false,"iPythonMetadata":null,"streamStates":{},"nuid":"d5fa511f-c99b-44d9-991a-fac18022ca97"},{"version":"CommandV1","origId":2229507819204131,"guid":"8e998d82-21f9-46ec-959a-5f9a335d5f5a","subtype":"command","commandType":"auto","position":31.0,"command":"class Decorator(left: String, right: String) {\n def layout[A](x: A) = left + x.toString() + right\n}\n","commandVersion":0,"state":"finished","results":{"type":"html","data":"<div class=\"ansiout\">defined class Decorator\n</div>","arguments":{},"addedWidgets":{},"removedWidgets":[],"datasetInfos":[]},"errorSummary":null,"error":null,"workflows":[],"startTime":1501818081347,"submitTime":1501818081332,"finishTime":1501818081566,"collapsed":false,"bindings":{},"inputWidgets":{},"displayType":"table","width":"auto","height":"auto","xColumns":null,"yColumns":null,"pivotColumns":null,"pivotAggregation":null,"customPlotOptions":{},"commentThread":[],"commentsVisible":false,"parentHierarchy":[],"diffInserts":[],"diffDeletes":[],"globalVars":{},"latestUser":"a user","commandTitle":"","showCommandTitle":false,"hideCommandCode":false,"hideCommandResult":false,"iPythonMetadata":null,"streamStates":{},"nuid":"1b9a72ac-64cf-4530-a746-ff2541b322c9"},{"version":"CommandV1","origId":2229507819204132,"guid":"31790f1e-3730-44f7-8438-49c8243660e8","subtype":"command","commandType":"auto","position":32.0,"command":"object FunTest{\n \n def apply(f: Int => String, v: Int) = f(v)\n \n val decorator = new Decorator(\"[\", \"]\")\n \n def f = println(apply(decorator.layout, 7))\n}","commandVersion":0,"state":"finished","results":{"type":"html","data":"<div class=\"ansiout\">defined module FunTest\n</div>","arguments":{},"addedWidgets":{},"removedWidgets":[],"datasetInfos":[]},"errorSummary":null,"error":null,"workflows":[],"startTime":1501818497360,"submitTime":1501818497349,"finishTime":1501818497475,"collapsed":false,"bindings":{},"inputWidgets":{},"displayType":"table","width":"auto","height":"auto","xColumns":null,"yColumns":null,"pivotColumns":null,"pivotAggregation":null,"customPlotOptions":{},"commentThread":[],"commentsVisible":false,"parentHierarchy":[],"diffInserts":[],"diffDeletes":[],"globalVars":{},"latestUser":"a user","commandTitle":"","showCommandTitle":false,"hideCommandCode":false,"hideCommandResult":false,"iPythonMetadata":null,"streamStates":{},"nuid":"7c6eb447-4154-4dc8-be11-3fcd71554b1c"},{"version":"CommandV1","origId":2229507819204133,"guid":"347cd26a-c4f0-48e6-ae98-dd3c29e6ab31","subtype":"command","commandType":"auto","position":33.0,"command":"FunTest.f","commandVersion":0,"state":"finished","results":{"type":"html","data":"<div class=\"ansiout\">[7]\n</div>","arguments":{},"addedWidgets":{},"removedWidgets":[],"datasetInfos":[]},"errorSummary":null,"error":null,"workflows":[],"startTime":1501818502330,"submitTime":1501818502317,"finishTime":1501818502439,"collapsed":false,"bindings":{},"inputWidgets":{},"displayType":"table","width":"auto","height":"auto","xColumns":null,"yColumns":null,"pivotColumns":null,"pivotAggregation":null,"customPlotOptions":{},"commentThread":[],"commentsVisible":false,"parentHierarchy":[],"diffInserts":[],"diffDeletes":[],"globalVars":{},"latestUser":"a user","commandTitle":"","showCommandTitle":false,"hideCommandCode":false,"hideCommandResult":false,"iPythonMetadata":null,"streamStates":{},"nuid":"fba6fee2-5fff-4a27-b6e1-b67f04c7b79e"},{"version":"CommandV1","origId":2229507819204134,"guid":"7bbefb9c-f158-4f92-a820-7e3ab3c217dc","subtype":"command","commandType":"auto","position":34.0,"command":"%md\n<h3>Nested Methods</h3>","commandVersion":0,"state":"finished","results":null,"errorSummary":null,"error":null,"workflows":[],"startTime":0,"submitTime":0,"finishTime":0,"collapsed":false,"bindings":{},"inputWidgets":{},"displayType":"table","width":"auto","height":"auto","xColumns":null,"yColumns":null,"pivotColumns":null,"pivotAggregation":null,"customPlotOptions":{},"commentThread":[],"commentsVisible":false,"parentHierarchy":[],"diffInserts":[],"diffDeletes":[],"globalVars":{},"latestUser":"a user","commandTitle":"","showCommandTitle":false,"hideCommandCode":false,"hideCommandResult":false,"iPythonMetadata":null,"streamStates":{},"nuid":"4547da80-0e2b-4406-b374-635c80163e0a"},{"version":"CommandV1","origId":2229507819204135,"guid":"0ea2b3a3-06da-41c8-ad5b-a6bdb5ee5d70","subtype":"command","commandType":"auto","position":35.0,"command":"def factorial(x: Int): Int = {\n def fact(x: Int, accumulator: Int): Int = {\n if (x <= 1) accumulator\n else fact(x - 1, x * accumulator)\n } \n fact(x, 1)\n }\n","commandVersion":0,"state":"finished","results":{"type":"html","data":"<div class=\"ansiout\">factorial: (x: Int)Int\n</div>","arguments":{},"addedWidgets":{},"removedWidgets":[],"datasetInfos":[]},"errorSummary":null,"error":null,"workflows":[],"startTime":1501819037558,"submitTime":1501819037544,"finishTime":1501819037764,"collapsed":false,"bindings":{},"inputWidgets":{},"displayType":"table","width":"auto","height":"auto","xColumns":null,"yColumns":null,"pivotColumns":null,"pivotAggregation":null,"customPlotOptions":{},"commentThread":[],"commentsVisible":false,"parentHierarchy":[],"diffInserts":[],"diffDeletes":[],"globalVars":{},"latestUser":"a user","commandTitle":"","showCommandTitle":false,"hideCommandCode":false,"hideCommandResult":false,"iPythonMetadata":null,"streamStates":{},"nuid":"e2466d03-c741-454e-96cb-9a7f3f4133e0"},{"version":"CommandV1","origId":2229507819204136,"guid":"65387f6e-3b7f-4f71-b8ee-2979c7312e2e","subtype":"command","commandType":"auto","position":36.0,"command":"factorial(2)","commandVersion":0,"state":"finished","results":{"type":"html","data":"<div class=\"ansiout\">res7: Int = 2\n</div>","arguments":{},"addedWidgets":{},"removedWidgets":[],"datasetInfos":[]},"errorSummary":null,"error":null,"workflows":[],"startTime":1501819083700,"submitTime":1501819083690,"finishTime":1501819083787,"collapsed":false,"bindings":{},"inputWidgets":{},"displayType":"table","width":"auto","height":"auto","xColumns":null,"yColumns":null,"pivotColumns":null,"pivotAggregation":null,"customPlotOptions":{},"commentThread":[],"commentsVisible":false,"parentHierarchy":[],"diffInserts":[],"diffDeletes":[],"globalVars":{},"latestUser":"a user","commandTitle":"","showCommandTitle":false,"hideCommandCode":false,"hideCommandResult":false,"iPythonMetadata":null,"streamStates":{},"nuid":"4262235c-c3db-4cca-88e1-a759e4c6218a"},{"version":"CommandV1","origId":2229507819204137,"guid":"545c6ed1-2594-442b-86c9-f0d0b809fb10","subtype":"command","commandType":"auto","position":37.0,"command":"factorial(3)","commandVersion":0,"state":"finished","results":{"type":"html","data":"<div class=\"ansiout\">res8: Int = 6\n</div>","arguments":{},"addedWidgets":{},"removedWidgets":[],"datasetInfos":[]},"errorSummary":null,"error":null,"workflows":[],"startTime":1501819106116,"submitTime":1501819106094,"finishTime":1501819106223,"collapsed":false,"bindings":{},"inputWidgets":{},"displayType":"table","width":"auto","height":"auto","xColumns":null,"yColumns":null,"pivotColumns":null,"pivotAggregation":null,"customPlotOptions":{},"commentThread":[],"commentsVisible":false,"parentHierarchy":[],"diffInserts":[],"diffDeletes":[],"globalVars":{},"latestUser":"a user","commandTitle":"","showCommandTitle":false,"hideCommandCode":false,"hideCommandResult":false,"iPythonMetadata":null,"streamStates":{},"nuid":"2940c626-78be-4fde-8f0e-17c8fc62942e"},{"version":"CommandV1","origId":2229507819204138,"guid":"f0f7f728-b60a-4a9f-be10-a1d0dea83303","subtype":"command","commandType":"auto","position":38.0,"command":"%md\n<h2>Currying</h2>","commandVersion":0,"state":"finished","results":null,"errorSummary":null,"error":null,"workflows":[],"startTime":0,"submitTime":0,"finishTime":0,"collapsed":false,"bindings":{},"inputWidgets":{},"displayType":"table","width":"auto","height":"auto","xColumns":null,"yColumns":null,"pivotColumns":null,"pivotAggregation":null,"customPlotOptions":{},"commentThread":[],"commentsVisible":false,"parentHierarchy":[],"diffInserts":[],"diffDeletes":[],"globalVars":{},"latestUser":"a user","commandTitle":"","showCommandTitle":false,"hideCommandCode":false,"hideCommandResult":false,"iPythonMetadata":null,"streamStates":{},"nuid":"6343732c-ca63-442e-9a2c-ccc7eec50d0a"},{"version":"CommandV1","origId":2229507819204139,"guid":"b01670fd-4c46-4d05-8126-408318a92b5e","subtype":"command","commandType":"auto","position":39.0,"command":"object CurryTest {\n\n def filter(x: Int, p: Int => Int): Int =\n p(x)\n\n def modN(n: Int)(x: Int) = (n * x) \n\n def main = {\n\n println(filter(10, modN(2))) \n //modN2 - Returns a func that takes one arg & returns boolean\n println(filter(20, modN(3)))\n }\n}","commandVersion":0,"state":"finished","results":{"type":"html","data":"<div class=\"ansiout\">defined module CurryTest\n</div>","arguments":{},"addedWidgets":{},"removedWidgets":[],"datasetInfos":[]},"errorSummary":"<div class=\"ansiout\"><console>:36: error: type mismatch;\n found : Unit\n required: Int\n println(p(xs))\n ^\n</div>","error":null,"workflows":[],"startTime":1501820315355,"submitTime":1501820315341,"finishTime":1501820315451,"collapsed":false,"bindings":{},"inputWidgets":{},"displayType":"table","width":"auto","height":"auto","xColumns":null,"yColumns":null,"pivotColumns":null,"pivotAggregation":null,"customPlotOptions":{},"commentThread":[],"commentsVisible":false,"parentHierarchy":[],"diffInserts":[],"diffDeletes":[],"globalVars":{},"latestUser":"a user","commandTitle":"","showCommandTitle":false,"hideCommandCode":false,"hideCommandResult":false,"iPythonMetadata":null,"streamStates":{},"nuid":"4781e89b-d5e3-4d30-9d95-874913b3be73"},{"version":"CommandV1","origId":2229507819204140,"guid":"256e780b-2e3d-4ff6-8229-3f6c7e5e0133","subtype":"command","commandType":"auto","position":40.0,"command":"CurryTest.main","commandVersion":0,"state":"finished","results":{"type":"html","data":"<div class=\"ansiout\">20\n60\n</div>","arguments":{},"addedWidgets":{},"removedWidgets":[],"datasetInfos":[]},"errorSummary":null,"error":null,"workflows":[],"startTime":1501820316961,"submitTime":1501820316948,"finishTime":1501820317027,"collapsed":false,"bindings":{},"inputWidgets":{},"displayType":"table","width":"auto","height":"auto","xColumns":null,"yColumns":null,"pivotColumns":null,"pivotAggregation":null,"customPlotOptions":{},"commentThread":[],"commentsVisible":false,"parentHierarchy":[],"diffInserts":[],"diffDeletes":[],"globalVars":{},"latestUser":"a user","commandTitle":"","showCommandTitle":false,"hideCommandCode":false,"hideCommandResult":false,"iPythonMetadata":null,"streamStates":{},"nuid":"027f220d-69df-4e37-b8a5-4f332daa3afb"},{"version":"CommandV1","origId":839630435663112,"guid":"3e703a83-10e5-4f02-9045-1b6a995ef8de","subtype":"command","commandType":"auto","position":40.5,"command":"%md\n<h3> Case Classes </h3>","commandVersion":0,"state":"finished","results":null,"errorSummary":null,"error":null,"workflows":[],"startTime":0,"submitTime":0,"finishTime":0,"collapsed":false,"bindings":{},"inputWidgets":{},"displayType":"table","width":"auto","height":"auto","xColumns":null,"yColumns":null,"pivotColumns":null,"pivotAggregation":null,"customPlotOptions":{},"commentThread":[],"commentsVisible":false,"parentHierarchy":[],"diffInserts":[],"diffDeletes":[],"globalVars":{},"latestUser":"a user","commandTitle":"","showCommandTitle":false,"hideCommandCode":false,"hideCommandResult":false,"iPythonMetadata":null,"streamStates":{},"nuid":"ff220406-1f02-446a-bbea-5e3ee8bdeb13"},{"version":"CommandV1","origId":2229507819204141,"guid":"516849d8-a956-485c-aa0b-ffcafd41097b","subtype":"command","commandType":"auto","position":41.0,"command":"case class Book(isbn: String)\n\nval frankenstein = Book(\"978-0486282114\")","commandVersion":0,"state":"finished","results":{"type":"html","data":"<div class=\"ansiout\">defined class Book\nfrankenstein: Book = Book(978-0486282114)\n</div>","arguments":{},"addedWidgets":{},"removedWidgets":[],"datasetInfos":[]},"errorSummary":null,"error":null,"workflows":[],"startTime":1501820787396,"submitTime":1501820787388,"finishTime":1501820787843,"collapsed":false,"bindings":{},"inputWidgets":{},"displayType":"table","width":"auto","height":"auto","xColumns":null,"yColumns":null,"pivotColumns":null,"pivotAggregation":null,"customPlotOptions":{},"commentThread":[],"commentsVisible":false,"parentHierarchy":[],"diffInserts":[],"diffDeletes":[],"globalVars":{},"latestUser":"a user","commandTitle":"","showCommandTitle":false,"hideCommandCode":false,"hideCommandResult":false,"iPythonMetadata":null,"streamStates":{},"nuid":"2914d1e9-7ad5-400d-8a9e-c9268eea9bea"},{"version":"CommandV1","origId":2229507819204142,"guid":"41dbd1a3-fe11-452a-a489-e34a3fdd918e","subtype":"command","commandType":"auto","position":42.0,"command":"case class Message(var sender: String, recipient: String, body: String)\nval message1 = Message(\"[email protected]\", \"[email protected]\", \"Ça va ?\")","commandVersion":0,"state":"finished","results":{"type":"html","data":"<div class=\"ansiout\">defined class Message\nmessage1: Message = Message([email protected],[email protected],Ça va ?)\n</div>","arguments":{},"addedWidgets":{},"removedWidgets":[],"datasetInfos":[]},"errorSummary":null,"error":null,"workflows":[],"startTime":1501820992306,"submitTime":1501820992294,"finishTime":1501820992431,"collapsed":false,"bindings":{},"inputWidgets":{},"displayType":"table","width":"auto","height":"auto","xColumns":null,"yColumns":null,"pivotColumns":null,"pivotAggregation":null,"customPlotOptions":{},"commentThread":[],"commentsVisible":false,"parentHierarchy":[],"diffInserts":[],"diffDeletes":[],"globalVars":{},"latestUser":"a user","commandTitle":"","showCommandTitle":false,"hideCommandCode":false,"hideCommandResult":false,"iPythonMetadata":null,"streamStates":{},"nuid":"6973eaca-c96a-413f-8eee-200ca580d9b7"},{"version":"CommandV1","origId":2229507819204143,"guid":"4aa95351-5543-48a1-963f-f28964786766","subtype":"command","commandType":"auto","position":43.0,"command":"println(message1.sender) // prints [email protected]\nmessage1.sender = \"[email protected]\" // this line does not compile","commandVersion":0,"state":"finished","results":{"type":"html","data":"<div class=\"ansiout\">[email protected]\nmessage1.sender: String = [email protected]\n</div>","arguments":{},"addedWidgets":{},"removedWidgets":[],"datasetInfos":[]},"errorSummary":"<div class=\"ansiout\"><console>:38: error: reassignment to val\n message1.sender = "[email protected]" // this line does not compile\n ^\n</div>","error":null,"workflows":[],"startTime":1501820994372,"submitTime":1501820994359,"finishTime":1501820994444,"collapsed":false,"bindings":{},"inputWidgets":{},"displayType":"table","width":"auto","height":"auto","xColumns":null,"yColumns":null,"pivotColumns":null,"pivotAggregation":null,"customPlotOptions":{},"commentThread":[],"commentsVisible":false,"parentHierarchy":[],"diffInserts":[],"diffDeletes":[],"globalVars":{},"latestUser":"a user","commandTitle":"","showCommandTitle":false,"hideCommandCode":false,"hideCommandResult":false,"iPythonMetadata":null,"streamStates":{},"nuid":"41b8910d-3a41-407f-ada3-f11ec3e659a7"},{"version":"CommandV1","origId":2229507819204144,"guid":"ad30a90b-42b1-4924-bb68-fdbc81b9516a","subtype":"command","commandType":"auto","position":44.0,"command":"case class Message(sender: String, recipient: String, body: String)\n\nval message2 = Message(\"[email protected]\", \"[email protected]\", \"Com va?\")\nval message3 = Message(\"[email protected]\", \"[email protected]\", \"Com va?\")\n\nval messagesAreTheSame = message2 == message3 // true","commandVersion":0,"state":"finished","results":{"type":"html","data":"<div class=\"ansiout\">defined class Message\nmessage2: Message = Message([email protected],[email protected],Com va?)\nmessage3: Message = Message([email protected],[email protected],Com va?)\nmessagesAreTheSame: Boolean = true\n</div>","arguments":{},"addedWidgets":{},"removedWidgets":[],"datasetInfos":[]},"errorSummary":null,"error":null,"workflows":[],"startTime":1501821028200,"submitTime":1501821028193,"finishTime":1501821028325,"collapsed":false,"bindings":{},"inputWidgets":{},"displayType":"table","width":"auto","height":"auto","xColumns":null,"yColumns":null,"pivotColumns":null,"pivotAggregation":null,"customPlotOptions":{},"commentThread":[],"commentsVisible":false,"parentHierarchy":[],"diffInserts":[],"diffDeletes":[],"globalVars":{},"latestUser":"a user","commandTitle":"","showCommandTitle":false,"hideCommandCode":false,"hideCommandResult":false,"iPythonMetadata":null,"streamStates":{},"nuid":"a47b0350-5670-4a31-9f00-f3052bfc3c82"},{"version":"CommandV1","origId":2229507819204145,"guid":"b8a1dd14-859c-4e0e-937c-79504dc9d5d9","subtype":"command","commandType":"auto","position":45.0,"command":"case class Message(sender: String, recipient: String, body: String)\nval message4 = Message(\"[email protected]\", \"[email protected]\", \"Me zo o komz gant ma amezeg\")\nval message5 = message4.copy(sender = message4.recipient, recipient = \"[email protected]\")\nprintln(message5.sender) // [email protected]\nprintln(message5.recipient) // [email protected]\nprintln(message5.body) // \"Me zo o komz gant ma amezeg\"","commandVersion":0,"state":"finished","results":{"type":"html","data":"<div class=\"ansiout\">[email protected]\[email protected]\nMe zo o komz gant ma amezeg\ndefined class Message\nmessage4: Message = Message([email protected],[email protected],Me zo o komz gant ma amezeg)\nmessage5: Message = Message([email protected],[email protected],Me zo o komz gant ma amezeg)\n</div>","arguments":{},"addedWidgets":{},"removedWidgets":[],"datasetInfos":[]},"errorSummary":null,"error":null,"workflows":[],"startTime":1501821140438,"submitTime":1501821140425,"finishTime":1501821140641,"collapsed":false,"bindings":{},"inputWidgets":{},"displayType":"table","width":"auto","height":"auto","xColumns":null,"yColumns":null,"pivotColumns":null,"pivotAggregation":null,"customPlotOptions":{},"commentThread":[],"commentsVisible":false,"parentHierarchy":[],"diffInserts":[],"diffDeletes":[],"globalVars":{},"latestUser":"a user","commandTitle":"","showCommandTitle":false,"hideCommandCode":false,"hideCommandResult":false,"iPythonMetadata":null,"streamStates":{},"nuid":"c0516efe-0d7f-4c52-890f-b5f6f30f4ea1"},{"version":"CommandV1","origId":2229507819204146,"guid":"a63197b4-6d80-45f3-8f91-fa98bc1ee999","subtype":"command","commandType":"auto","position":46.0,"command":"%md\n<h3>Pattern Matching</h3>","commandVersion":0,"state":"finished","results":null,"errorSummary":null,"error":null,"workflows":[],"startTime":0,"submitTime":0,"finishTime":0,"collapsed":false,"bindings":{},"inputWidgets":{},"displayType":"table","width":"auto","height":"auto","xColumns":null,"yColumns":null,"pivotColumns":null,"pivotAggregation":null,"customPlotOptions":{},"commentThread":[],"commentsVisible":false,"parentHierarchy":[],"diffInserts":[],"diffDeletes":[],"globalVars":{},"latestUser":"a user","commandTitle":"","showCommandTitle":false,"hideCommandCode":false,"hideCommandResult":false,"iPythonMetadata":null,"streamStates":{},"nuid":"26800f4e-512a-4202-995e-7e5a78ae07ae"},{"version":"CommandV1","origId":839630435663110,"guid":"7fced873-5a0e-4691-95f8-b947d7b0065e","subtype":"command","commandType":"auto","position":47.0,"command":"import scala.util.Random\n\nval x: Int = Random.nextInt(3)\n\nx match {\n case 0 => \"zero\"\n case 1 => \"one\"\n case 2 => \"two\"\n case _ => \"many\"\n}","commandVersion":0,"state":"finished","results":{"type":"html","data":"<div class=\"ansiout\">import scala.util.Random\nx: Int = 0\nres6: String = zero\n</div>","arguments":{},"addedWidgets":{},"removedWidgets":[],"datasetInfos":[]},"errorSummary":null,"error":null,"workflows":[],"startTime":1502076371444,"submitTime":1502076371430,"finishTime":1502076371633,"collapsed":false,"bindings":{},"inputWidgets":{},"displayType":"table","width":"auto","height":"auto","xColumns":null,"yColumns":null,"pivotColumns":null,"pivotAggregation":null,"customPlotOptions":{},"commentThread":[],"commentsVisible":false,"parentHierarchy":[],"diffInserts":[],"diffDeletes":[],"globalVars":{},"latestUser":"a user","commandTitle":"","showCommandTitle":false,"hideCommandCode":false,"hideCommandResult":false,"iPythonMetadata":null,"streamStates":{},"nuid":"d520ea54-a039-4360-999d-e9840b07507f"},{"version":"CommandV1","origId":839630435663111,"guid":"403800c7-5686-41bc-b513-66fae51f4cce","subtype":"command","commandType":"auto","position":48.0,"command":"def matchTest(x: Int): String = x match {\n case 1 => \"one\"\n case 2 => \"two\"\n case _ => \"many\"\n}\nmatchTest(3) // many\nmatchTest(1) // one","commandVersion":0,"state":"finished","results":{"type":"html","data":"<div class=\"ansiout\">matchTest: (x: Int)String\nres7: String = one\n</div>","arguments":{},"addedWidgets":{},"removedWidgets":[],"datasetInfos":[]},"errorSummary":null,"error":null,"workflows":[],"startTime":1502076464107,"submitTime":1502076464089,"finishTime":1502076464326,"collapsed":false,"bindings":{},"inputWidgets":{},"displayType":"table","width":"auto","height":"auto","xColumns":null,"yColumns":null,"pivotColumns":null,"pivotAggregation":null,"customPlotOptions":{},"commentThread":[],"commentsVisible":false,"parentHierarchy":[],"diffInserts":[],"diffDeletes":[],"globalVars":{},"latestUser":"a user","commandTitle":"","showCommandTitle":false,"hideCommandCode":false,"hideCommandResult":false,"iPythonMetadata":null,"streamStates":{},"nuid":"49afa3c8-2190-48e6-891f-0de40dbeb56b"},{"version":"CommandV1","origId":839630435663113,"guid":"bd0e2cd2-2750-466a-8db3-bad95f75e5f8","subtype":"command","commandType":"auto","position":49.0,"command":"abstract class Notification\n\ncase class Email(sender: String, title: String, body: String) extends Notification\n\ncase class SMS(caller: String, message: String) extends Notification\n\ncase class VoiceRecording(contactName: String, link: String) extends Notification\n\n","commandVersion":0,"state":"finished","results":{"type":"html","data":"<div class=\"ansiout\">defined class Notification\ndefined class Email\ndefined class SMS\ndefined class VoiceRecording\n</div>","arguments":{},"addedWidgets":{},"removedWidgets":[],"datasetInfos":[]},"errorSummary":null,"error":null,"workflows":[],"startTime":1502076492948,"submitTime":1502076492927,"finishTime":1502076493877,"collapsed":false,"bindings":{},"inputWidgets":{},"displayType":"table","width":"auto","height":"auto","xColumns":null,"yColumns":null,"pivotColumns":null,"pivotAggregation":null,"customPlotOptions":{},"commentThread":[],"commentsVisible":false,"parentHierarchy":[],"diffInserts":[],"diffDeletes":[],"globalVars":{},"latestUser":"a user","commandTitle":"","showCommandTitle":false,"hideCommandCode":false,"hideCommandResult":false,"iPythonMetadata":null,"streamStates":{},"nuid":"f63f2d96-3ab6-486d-a755-5e923da1663e"},{"version":"CommandV1","origId":839630435663114,"guid":"17cf77e4-3422-4b6a-bb1a-cc066e453363","subtype":"command","commandType":"auto","position":50.0,"command":"def showNotification(notification: Notification): String = {\n notification match {\n case Email(email, title, _) =>\n s\"You got an email from $email with title: $title\"\n case SMS(number, message) =>\n s\"You got an SMS from $number! Message: $message\"\n case VoiceRecording(name, link) =>\n s\"you received a Voice Recording from $name! Click the link to hear it: $link\"\n }\n}","commandVersion":0,"state":"finished","results":{"type":"html","data":"<div class=\"ansiout\">showNotification: (notification: Notification)String\n</div>","arguments":{},"addedWidgets":{},"removedWidgets":[],"datasetInfos":[]},"errorSummary":null,"error":null,"workflows":[],"startTime":1502076532260,"submitTime":1502076532242,"finishTime":1502076532638,"collapsed":false,"bindings":{},"inputWidgets":{},"displayType":"table","width":"auto","height":"auto","xColumns":null,"yColumns":null,"pivotColumns":null,"pivotAggregation":null,"customPlotOptions":{},"commentThread":[],"commentsVisible":false,"parentHierarchy":[],"diffInserts":[],"diffDeletes":[],"globalVars":{},"latestUser":"a user","commandTitle":"","showCommandTitle":false,"hideCommandCode":false,"hideCommandResult":false,"iPythonMetadata":null,"streamStates":{},"nuid":"c56d3858-22d1-4617-ac17-164d3cad23d1"},{"version":"CommandV1","origId":839630435663115,"guid":"45dc6b7a-9a0a-4be4-afb2-7e4ab90d0476","subtype":"command","commandType":"auto","position":51.0,"command":"val someSms = SMS(\"12345\", \"Are you there?\")\nval someVoiceRecording = VoiceRecording(\"Tom\", \"voicerecording.org/id/123\")","commandVersion":0,"state":"finished","results":{"type":"html","data":"<div class=\"ansiout\">someSms: SMS = SMS(12345,Are you there?)\nsomeVoiceRecording: VoiceRecording = VoiceRecording(Tom,voicerecording.org/id/123)\n</div>","arguments":{},"addedWidgets":{},"removedWidgets":[],"datasetInfos":[]},"errorSummary":null,"error":null,"workflows":[],"startTime":1502076628462,"submitTime":1502076628444,"finishTime":1502076628618,"collapsed":false,"bindings":{},"inputWidgets":{},"displayType":"table","width":"auto","height":"auto","xColumns":null,"yColumns":null,"pivotColumns":null,"pivotAggregation":null,"customPlotOptions":{},"commentThread":[],"commentsVisible":false,"parentHierarchy":[],"diffInserts":[],"diffDeletes":[],"globalVars":{},"latestUser":"a user","commandTitle":"","showCommandTitle":false,"hideCommandCode":false,"hideCommandResult":false,"iPythonMetadata":null,"streamStates":{},"nuid":"adad9c73-c27f-421a-991c-c533bc6e43a2"},{"version":"CommandV1","origId":839630435663116,"guid":"b20ec479-a99f-47b8-b25d-e47bad68f298","subtype":"command","commandType":"auto","position":52.0,"command":"println(showNotification(someSms))","commandVersion":0,"state":"finished","results":{"type":"html","data":"<div class=\"ansiout\">You got an SMS from 12345! Message: Are you there?\n</div>","arguments":{},"addedWidgets":{},"removedWidgets":[],"datasetInfos":[]},"errorSummary":null,"error":null,"workflows":[],"startTime":1502076644339,"submitTime":1502076644321,"finishTime":1502076644553,"collapsed":false,"bindings":{},"inputWidgets":{},"displayType":"table","width":"auto","height":"auto","xColumns":null,"yColumns":null,"pivotColumns":null,"pivotAggregation":null,"customPlotOptions":{},"commentThread":[],"commentsVisible":false,"parentHierarchy":[],"diffInserts":[],"diffDeletes":[],"globalVars":{},"latestUser":"a user","commandTitle":"","showCommandTitle":false,"hideCommandCode":false,"hideCommandResult":false,"iPythonMetadata":null,"streamStates":{},"nuid":"bd6d2d90-ac4d-480e-8a96-806275f1d7ab"},{"version":"CommandV1","origId":839630435663117,"guid":"b3e22949-5b6f-46ee-972c-2c03b7e763cb","subtype":"command","commandType":"auto","position":53.0,"command":"abstract class Device\n\ncase class Phone(model: String) extends Device{\n def screenOff = \"Turning screen off\"\n}\n\ncase class Computer(model: String) extends Device {\n def screenSaverOn = \"Turning screen saver on...\"\n}\n\ndef goIdle(device: Device) = device match {\n case p: Phone => p.screenOff\n case c: Computer => c.screenSaverOn\n}","commandVersion":0,"state":"finished","results":{"type":"html","data":"<div class=\"ansiout\">defined class Device\ndefined class Phone\ndefined class Computer\ngoIdle: (device: Device)String\n</div>","arguments":{},"addedWidgets":{},"removedWidgets":[],"datasetInfos":[]},"errorSummary":null,"error":null,"workflows":[],"startTime":1502076780929,"submitTime":1502076780913,"finishTime":1502076781177,"collapsed":false,"bindings":{},"inputWidgets":{},"displayType":"table","width":"auto","height":"auto","xColumns":null,"yColumns":null,"pivotColumns":null,"pivotAggregation":null,"customPlotOptions":{},"commentThread":[],"commentsVisible":false,"parentHierarchy":[],"diffInserts":[],"diffDeletes":[],"globalVars":{},"latestUser":"a user","commandTitle":"","showCommandTitle":false,"hideCommandCode":false,"hideCommandResult":false,"iPythonMetadata":null,"streamStates":{},"nuid":"f453e674-0afd-40bf-8f7f-a8db6a950302"},{"version":"CommandV1","origId":839630435663118,"guid":"82931df4-52f8-415a-8238-90653232862d","subtype":"command","commandType":"auto","position":54.0,"command":"goIdle(Phone(\"abc\"))","commandVersion":0,"state":"finished","results":{"type":"html","data":"<div class=\"ansiout\">res9: String = Turning screen off\n</div>","arguments":{},"addedWidgets":{},"removedWidgets":[],"datasetInfos":[]},"errorSummary":null,"error":null,"workflows":[],"startTime":1502076811234,"submitTime":1502076811216,"finishTime":1502076811377,"collapsed":false,"bindings":{},"inputWidgets":{},"displayType":"table","width":"auto","height":"auto","xColumns":null,"yColumns":null,"pivotColumns":null,"pivotAggregation":null,"customPlotOptions":{},"commentThread":[],"commentsVisible":false,"parentHierarchy":[],"diffInserts":[],"diffDeletes":[],"globalVars":{},"latestUser":"a user","commandTitle":"","showCommandTitle":false,"hideCommandCode":false,"hideCommandResult":false,"iPythonMetadata":null,"streamStates":{},"nuid":"dfcae349-4201-47e1-a3df-bc50bdf776ef"},{"version":"CommandV1","origId":839630435663119,"guid":"2ed4f362-46eb-429d-b278-d68a4bcc78ad","subtype":"command","commandType":"auto","position":55.0,"command":"%md\n<h3> Sealed Classes </h3>\n\n* All subtypes must b in same file","commandVersion":0,"state":"finished","results":null,"errorSummary":null,"error":null,"workflows":[],"startTime":0,"submitTime":0,"finishTime":0,"collapsed":false,"bindings":{},"inputWidgets":{},"displayType":"table","width":"auto","height":"auto","xColumns":null,"yColumns":null,"pivotColumns":null,"pivotAggregation":null,"customPlotOptions":{},"commentThread":[],"commentsVisible":false,"parentHierarchy":[],"diffInserts":[],"diffDeletes":[],"globalVars":{},"latestUser":"a user","commandTitle":"","showCommandTitle":false,"hideCommandCode":false,"hideCommandResult":false,"iPythonMetadata":null,"streamStates":{},"nuid":"e645181d-4b5c-4448-a3d2-473b8487e680"},{"version":"CommandV1","origId":839630435663120,"guid":"98c788d2-6978-4629-8a3d-6a641fabe541","subtype":"command","commandType":"auto","position":56.0,"command":"sealed abstract class Furniture\ncase class Couch() extends Furniture\ncase class Chair() extends Furniture\n\ndef findPlaceToSit(piece: Furniture): String = piece match {\n case a: Couch => \"Lie on the couch\"\n case b: Chair => \"Sit on the chair\"\n}","commandVersion":0,"state":"finished","results":null,"errorSummary":null,"error":null,"workflows":[],"startTime":0,"submitTime":0,"finishTime":0,"collapsed":false,"bindings":{},"inputWidgets":{},"displayType":"table","width":"auto","height":"auto","xColumns":null,"yColumns":null,"pivotColumns":null,"pivotAggregation":null,"customPlotOptions":{},"commentThread":[],"commentsVisible":false,"parentHierarchy":[],"diffInserts":[],"diffDeletes":[],"globalVars":{},"latestUser":"a user","commandTitle":"","showCommandTitle":false,"hideCommandCode":false,"hideCommandResult":false,"iPythonMetadata":null,"streamStates":{},"nuid":"ed437161-a715-4ed6-a1d8-9e26614c418d"},{"version":"CommandV1","origId":839630435663121,"guid":"3e8e9e6d-6237-4e3e-aba7-79aacf985ab6","subtype":"command","commandType":"auto","position":57.0,"command":"%md\n<h3>Singleton Objects</h3>\n* Creates one instance of class\n","commandVersion":0,"state":"finished","results":null,"errorSummary":null,"error":null,"workflows":[],"startTime":0,"submitTime":0,"finishTime":0,"collapsed":false,"bindings":{},"inputWidgets":{},"displayType":"table","width":"auto","height":"auto","xColumns":null,"yColumns":null,"pivotColumns":null,"pivotAggregation":null,"customPlotOptions":{},"commentThread":[],"commentsVisible":false,"parentHierarchy":[],"diffInserts":[],"diffDeletes":[],"globalVars":{},"latestUser":"a user","commandTitle":"","showCommandTitle":false,"hideCommandCode":false,"hideCommandResult":false,"iPythonMetadata":null,"streamStates":{},"nuid":"b72d22c5-a17a-4ea1-82cc-e6ea2d1e1cf3"},{"version":"CommandV1","origId":839630435663122,"guid":"9f5d0eb9-74dd-406f-b8d6-f4b62f427254","subtype":"command","commandType":"auto","position":58.0,"command":"object Blah {\n def sum(l : List[Int]) : Int = l.sum\n}","commandVersion":0,"state":"finished","results":{"type":"html","data":"<div class=\"ansiout\">defined module Blah\n</div>","arguments":{},"addedWidgets":{},"removedWidgets":[],"datasetInfos":[]},"errorSummary":null,"error":null,"workflows":[],"startTime":1502077053734,"submitTime":1502077053706,"finishTime":1502077054328,"collapsed":false,"bindings":{},"inputWidgets":{},"displayType":"table","width":"auto","height":"auto","xColumns":null,"yColumns":null,"pivotColumns":null,"pivotAggregation":null,"customPlotOptions":{},"commentThread":[],"commentsVisible":false,"parentHierarchy":[],"diffInserts":[],"diffDeletes":[],"globalVars":{},"latestUser":"a user","commandTitle":"","showCommandTitle":false,"hideCommandCode":false,"hideCommandResult":false,"iPythonMetadata":null,"streamStates":{},"nuid":"069bd914-75d3-40d1-9520-4da8b1c6be88"},{"version":"CommandV1","origId":839630435663123,"guid":"172d4453-e1dd-4305-a113-5c2ae13566bb","subtype":"command","commandType":"auto","position":59.0,"command":"Blah.sum(List(2,3,4,4))","commandVersion":0,"state":"finished","results":{"type":"html","data":"<div class=\"ansiout\">res10: Int = 13\n</div>","arguments":{},"addedWidgets":{},"removedWidgets":[],"datasetInfos":[]},"errorSummary":"<div class=\"ansiout\"><console>:2: error: illegal start of simple expression\n Blah.sum(List([2,3,4,4]))\n ^\n</div>","error":null,"workflows":[],"startTime":1502077105473,"submitTime":1502077105454,"finishTime":1502077105692,"collapsed":false,"bindings":{},"inputWidgets":{},"displayType":"table","width":"auto","height":"auto","xColumns":null,"yColumns":null,"pivotColumns":null,"pivotAggregation":null,"customPlotOptions":{},"commentThread":[],"commentsVisible":false,"parentHierarchy":[],"diffInserts":[],"diffDeletes":[],"globalVars":{},"latestUser":"a user","commandTitle":"","showCommandTitle":false,"hideCommandCode":false,"hideCommandResult":false,"iPythonMetadata":null,"streamStates":{},"nuid":"b1b5f7a8-c83b-4751-8759-7cc446c52efc"},{"version":"CommandV1","origId":839630435663124,"guid":"0400186f-5508-410c-8d77-7305e18c5bfe","subtype":"command","commandType":"auto","position":60.0,"command":"%md\n<h4>Companions</h4>\n* most singleton classes don't stay alone, but instead are associated with a class with same name\n* Singletob obj is known as companion object & class is known as companion class","commandVersion":0,"state":"finished","results":null,"errorSummary":null,"error":null,"workflows":[],"startTime":0,"submitTime":0,"finishTime":0,"collapsed":false,"bindings":{},"inputWidgets":{},"displayType":"table","width":"auto","height":"auto","xColumns":null,"yColumns":null,"pivotColumns":null,"pivotAggregation":null,"customPlotOptions":{},"commentThread":[],"commentsVisible":false,"parentHierarchy":[],"diffInserts":[],"diffDeletes":[],"globalVars":{},"latestUser":"a user","commandTitle":"","showCommandTitle":false,"hideCommandCode":false,"hideCommandResult":false,"iPythonMetadata":null,"streamStates":{},"nuid":"a8fe8165-9818-47f5-9317-6471f1237b9f"},{"version":"CommandV1","origId":839630435663125,"guid":"771090f2-a71b-4e5b-8673-ca6ce2f7ee11","subtype":"command","commandType":"auto","position":61.0,"command":"class IntPair(val x: Int, val y: Int)\n\nobject IntPair {\n \n}","commandVersion":0,"state":"finished","results":{"type":"html","data":"<div class=\"ansiout\">defined class IntPair\ndefined module IntPair\n</div>","arguments":{},"addedWidgets":{},"removedWidgets":[],"datasetInfos":[]},"errorSummary":null,"error":null,"workflows":[],"startTime":1502077536257,"submitTime":1502077536237,"finishTime":1502077536433,"collapsed":false,"bindings":{},"inputWidgets":{},"displayType":"table","width":"auto","height":"auto","xColumns":null,"yColumns":null,"pivotColumns":null,"pivotAggregation":null,"customPlotOptions":{},"commentThread":[],"commentsVisible":false,"parentHierarchy":[],"diffInserts":[],"diffDeletes":[],"globalVars":{},"latestUser":"a user","commandTitle":"","showCommandTitle":false,"hideCommandCode":false,"hideCommandResult":false,"iPythonMetadata":null,"streamStates":{},"nuid":"aabc77a4-2c1e-4e96-a9a0-5c388cec2503"},{"version":"CommandV1","origId":839630435663126,"guid":"b9440368-ff60-419b-abe7-f76df4de9959","subtype":"command","commandType":"auto","position":62.0,"command":"%md\n<h5>For Comprehensions</h5>","commandVersion":0,"state":"finished","results":null,"errorSummary":null,"error":null,"workflows":[],"startTime":0,"submitTime":0,"finishTime":0,"collapsed":false,"bindings":{},"inputWidgets":{},"displayType":"table","width":"auto","height":"auto","xColumns":null,"yColumns":null,"pivotColumns":null,"pivotAggregation":null,"customPlotOptions":{},"commentThread":[],"commentsVisible":false,"parentHierarchy":[],"diffInserts":[],"diffDeletes":[],"globalVars":{},"latestUser":"a user","commandTitle":"","showCommandTitle":false,"hideCommandCode":false,"hideCommandResult":false,"iPythonMetadata":null,"streamStates":{},"nuid":"299b3206-5ecb-4906-966f-afa79b605465"},{"version":"CommandV1","origId":839630435663127,"guid":"2ee1eb86-b7a3-4cd8-b63b-6df01a1ef162","subtype":"command","commandType":"auto","position":63.0,"command":"case class User(val name: String, val age: Int)\n\nval userBase = List(new User(\"Travis\", 28),\n new User(\"Kelly\", 33),\n new User(\"Jennifer\", 44),\n new User(\"Dennis\", 23))\n\nval twentySomethings = for (user <- userBase if (user.age >=20 && user.age < 30))\n yield user.name // i.e. add this to a list\n\ntwentySomethings.foreach(name => println(name)) // prints Travis Dennis","commandVersion":0,"state":"finished","results":{"type":"html","data":"<div class=\"ansiout\">Travis\nDennis\ndefined class User\nuserBase: List[User] = List(User(Travis,28), User(Kelly,33), User(Jennifer,44), User(Dennis,23))\ntwentySomethings: List[String] = List(Travis, Dennis)\n</div>","arguments":{},"addedWidgets":{},"removedWidgets":[],"datasetInfos":[]},"errorSummary":null,"error":null,"workflows":[],"startTime":1502077727303,"submitTime":1502077727286,"finishTime":1502077727719,"collapsed":false,"bindings":{},"inputWidgets":{},"displayType":"table","width":"auto","height":"auto","xColumns":null,"yColumns":null,"pivotColumns":null,"pivotAggregation":null,"customPlotOptions":{},"commentThread":[],"commentsVisible":false,"parentHierarchy":[],"diffInserts":[],"diffDeletes":[],"globalVars":{},"latestUser":"a user","commandTitle":"","showCommandTitle":false,"hideCommandCode":false,"hideCommandResult":false,"iPythonMetadata":null,"streamStates":{},"nuid":"7ac6052a-9129-4b78-90b2-19f4b6f2bd5e"},{"version":"CommandV1","origId":839630435663128,"guid":"78185515-907d-4f52-a9ce-f400c87f9ae7","subtype":"command","commandType":"auto","position":64.0,"command":"def foo(n: Int, v: Int) =\n for (i <- 0 until n;\n j <- i until n if i + j == v)\n yield (i, j)\n\nfoo(10, 10) .foreach {\n case (i, j) =>\n print(s\"($i, $j) \") // prints (1, 9) (2, 8) (3, 7) (4, 6) (5, 5)\n}","commandVersion":0,"state":"finished","results":{"type":"html","data":"<div class=\"ansiout\">(1, 9) (2, 8) (3, 7) (4, 6) (5, 5) foo: (n: Int, v: Int)scala.collection.immutable.IndexedSeq[(Int, Int)]\n</div>","arguments":{},"addedWidgets":{},"removedWidgets":[],"datasetInfos":[]},"errorSummary":null,"error":null,"workflows":[],"startTime":1502078034750,"submitTime":1502078034728,"finishTime":1502078035120,"collapsed":false,"bindings":{},"inputWidgets":{},"displayType":"table","width":"auto","height":"auto","xColumns":null,"yColumns":null,"pivotColumns":null,"pivotAggregation":null,"customPlotOptions":{},"commentThread":[],"commentsVisible":false,"parentHierarchy":[],"diffInserts":[],"diffDeletes":[],"globalVars":{},"latestUser":"a user","commandTitle":"","showCommandTitle":false,"hideCommandCode":false,"hideCommandResult":false,"iPythonMetadata":null,"streamStates":{},"nuid":"2f0fa55a-71b6-4b62-b324-ffb0e5eaeb3f"},{"version":"CommandV1","origId":839630435663129,"guid":"46f4c555-5418-4edf-b280-a35142800eec","subtype":"command","commandType":"auto","position":65.0,"command":"foo(5,5)","commandVersion":0,"state":"finished","results":{"type":"html","data":"<div class=\"ansiout\">res13: scala.collection.immutable.IndexedSeq[(Int, Int)] = Vector((1,4), (2,3))\n</div>","arguments":{},"addedWidgets":{},"removedWidgets":[],"datasetInfos":[]},"errorSummary":null,"error":null,"workflows":[],"startTime":1502077983097,"submitTime":1502077983083,"finishTime":1502077983423,"collapsed":false,"bindings":{},"inputWidgets":{},"displayType":"table","width":"auto","height":"auto","xColumns":null,"yColumns":null,"pivotColumns":null,"pivotAggregation":null,"customPlotOptions":{},"commentThread":[],"commentsVisible":false,"parentHierarchy":[],"diffInserts":[],"diffDeletes":[],"globalVars":{},"latestUser":"a user","commandTitle":"","showCommandTitle":false,"hideCommandCode":false,"hideCommandResult":false,"iPythonMetadata":null,"streamStates":{},"nuid":"0f4125a3-2b5f-48f7-830d-e1c2167efc34"},{"version":"CommandV1","origId":839630435663130,"guid":"4c86d443-267b-4005-9c18-6a1da7c54b83","subtype":"command","commandType":"auto","position":66.0,"command":"%md\n<h4>Extractor Object</h4>\n* Extractor object is an object with unapply method\n* apply is like a const which takes argument & ctreates object","commandVersion":0,"state":"finished","results":null,"errorSummary":null,"error":null,"workflows":[],"startTime":0,"submitTime":0,"finishTime":0,"collapsed":false,"bindings":{},"inputWidgets":{},"displayType":"table","width":"auto","height":"auto","xColumns":null,"yColumns":null,"pivotColumns":null,"pivotAggregation":null,"customPlotOptions":{},"commentThread":[],"commentsVisible":false,"parentHierarchy":[],"diffInserts":[],"diffDeletes":[],"globalVars":{},"latestUser":"a user","commandTitle":"","showCommandTitle":false,"hideCommandCode":false,"hideCommandResult":false,"iPythonMetadata":null,"streamStates":{},"nuid":"9f1435d6-0109-4c1c-9d23-22f44a9b3f5d"},{"version":"CommandV1","origId":839630435663131,"guid":"442ed6b4-0136-4183-9d38-62418c51377d","subtype":"command","commandType":"auto","position":67.0,"command":"import scala.util.Random\n\nobject CustomerID {\n\n def apply(name: String) = s\"$name--${Random.nextLong}\"\n\n def unapply(customerID: String): Option[String] = {\n val name = customerID.split(\"--\").head\n if (name.nonEmpty) Some(name) else None\n }\n}\n\nval customer1ID = CustomerID(\"Sukyoung\") // Sukyoung--23098234908 => CustomerID.apply(\"\")\n\ncustomer1ID match {\n case CustomerID(name) => println(name) // prints Sukyoung\n case _ => println(\"Could not extract a CustomerID\")\n}","commandVersion":0,"state":"finished","results":{"type":"html","data":"<div class=\"ansiout\">Sukyoung\nimport scala.util.Random\ndefined module CustomerID\ncustomer1ID: String = Sukyoung--834309442217755124\n</div>","arguments":{},"addedWidgets":{},"removedWidgets":[],"datasetInfos":[]},"errorSummary":"<div class=\"ansiout\"><console>:66: error: not found: value customer1ID2\n customer1ID2 match {\n ^\n</div>","error":null,"workflows":[],"startTime":1502078808300,"submitTime":1502078808285,"finishTime":1502078808501,"collapsed":false,"bindings":{},"inputWidgets":{},"displayType":"table","width":"auto","height":"auto","xColumns":null,"yColumns":null,"pivotColumns":null,"pivotAggregation":null,"customPlotOptions":{},"commentThread":[],"commentsVisible":false,"parentHierarchy":[],"diffInserts":[],"diffDeletes":[],"globalVars":{},"latestUser":"a user","commandTitle":"","showCommandTitle":false,"hideCommandCode":false,"hideCommandResult":false,"iPythonMetadata":null,"streamStates":{},"nuid":"105b02bc-d616-4a49-8afa-7096782f39fc"},{"version":"CommandV1","origId":839630435663132,"guid":"7de6beee-309b-4396-a78b-61b84e849f00","subtype":"command","commandType":"auto","position":68.0,"command":"val customer2ID = CustomerID(\"Nico\")\nval CustomerID(name) = customer2ID\nprintln(name) // prints Nico","commandVersion":0,"state":"finished","results":{"type":"html","data":"<div class=\"ansiout\">Nico\ncustomer2ID: String = Nico---5904679195068478929\nname: String = Nico\n</div>","arguments":{},"addedWidgets":{},"removedWidgets":[],"datasetInfos":[]},"errorSummary":null,"error":null,"workflows":[],"startTime":1502078843706,"submitTime":1502078843686,"finishTime":1502078843916,"collapsed":false,"bindings":{},"inputWidgets":{},"displayType":"table","width":"auto","height":"auto","xColumns":null,"yColumns":null,"pivotColumns":null,"pivotAggregation":null,"customPlotOptions":{},"commentThread":[],"commentsVisible":false,"parentHierarchy":[],"diffInserts":[],"diffDeletes":[],"globalVars":{},"latestUser":"a user","commandTitle":"","showCommandTitle":false,"hideCommandCode":false,"hideCommandResult":false,"iPythonMetadata":null,"streamStates":{},"nuid":"e9347de2-bd16-4332-a207-0b6dfe864d60"},{"version":"CommandV1","origId":839630435663133,"guid":"87287e8f-676a-4181-b7a6-730599a2c667","subtype":"command","commandType":"auto","position":69.0,"command":"val name = CustomerID.unapply(customer2ID).get","commandVersion":0,"state":"finished","results":{"type":"html","data":"<div class=\"ansiout\">name: String = Nico\n</div>","arguments":{},"addedWidgets":{},"removedWidgets":[],"datasetInfos":[]},"errorSummary":null,"error":null,"workflows":[],"startTime":1502078894887,"submitTime":1502078894866,"finishTime":1502078895048,"collapsed":false,"bindings":{},"inputWidgets":{},"displayType":"table","width":"auto","height":"auto","xColumns":null,"yColumns":null,"pivotColumns":null,"pivotAggregation":null,"customPlotOptions":{},"commentThread":[],"commentsVisible":false,"parentHierarchy":[],"diffInserts":[],"diffDeletes":[],"globalVars":{},"latestUser":"a user","commandTitle":"","showCommandTitle":false,"hideCommandCode":false,"hideCommandResult":false,"iPythonMetadata":null,"streamStates":{},"nuid":"5794452e-ea1c-4f75-8448-9546a1815ac8"},{"version":"CommandV1","origId":839630435663134,"guid":"63a27f93-9e1a-4ea0-9396-3221134bed8b","subtype":"command","commandType":"auto","position":70.0,"command":"%md\n<h3>SEQUENCE COMPREHENSIONS</h3>","commandVersion":0,"state":"error","results":null,"errorSummary":"<div class=\"ansiout\"><console>:56: error: not found: value ####\n #### SEQUENCE COMPREHENSIONS\n ^\n</div>","error":null,"workflows":[],"startTime":1502078986026,"submitTime":1502078986026,"finishTime":1502078986080,"collapsed":false,"bindings":{},"inputWidgets":{},"displayType":"table","width":"auto","height":"auto","xColumns":null,"yColumns":null,"pivotColumns":null,"pivotAggregation":null,"customPlotOptions":{},"commentThread":[],"commentsVisible":false,"parentHierarchy":[],"diffInserts":[],"diffDeletes":[],"globalVars":{},"latestUser":"a user","commandTitle":"","showCommandTitle":false,"hideCommandCode":false,"hideCommandResult":false,"iPythonMetadata":null,"streamStates":{},"nuid":"a382b6d3-668e-4727-9203-68fca6e21013"},{"version":"CommandV1","origId":839630435663135,"guid":"4fc6ac78-9ace-4b79-9580-93a657bbe60f","subtype":"command","commandType":"auto","position":71.0,"command":"object ComprehensionTest1 {\n def even(from: Int, to: Int): List[Int] =\n for (i <- List.range(from, to) if i % 2 == 0) yield i\n def main = println(even(0, 20))\n}","commandVersion":0,"state":"finished","results":{"type":"html","data":"<div class=\"ansiout\">defined module ComprehensionTest1\n</div>","arguments":{},"addedWidgets":{},"removedWidgets":[],"datasetInfos":[]},"errorSummary":null,"error":null,"workflows":[],"startTime":1502079114290,"submitTime":1502079114270,"finishTime":1502079114462,"collapsed":false,"bindings":{},"inputWidgets":{},"displayType":"table","width":"auto","height":"auto","xColumns":null,"yColumns":null,"pivotColumns":null,"pivotAggregation":null,"customPlotOptions":{},"commentThread":[],"commentsVisible":false,"parentHierarchy":[],"diffInserts":[],"diffDeletes":[],"globalVars":{},"latestUser":"a user","commandTitle":"","showCommandTitle":false,"hideCommandCode":false,"hideCommandResult":false,"iPythonMetadata":null,"streamStates":{},"nuid":"039f15ab-a307-45f7-b059-1a6015d61115"},{"version":"CommandV1","origId":839630435663136,"guid":"67bf20e1-5156-4e15-aae0-006ca42521d2","subtype":"command","commandType":"auto","position":72.0,"command":"ComprehensionTest1.main","commandVersion":0,"state":"finished","results":{"type":"html","data":"<div class=\"ansiout\">List(0, 2, 4, 6, 8, 10, 12, 14, 16, 18)\n</div>","arguments":{},"addedWidgets":{},"removedWidgets":[],"datasetInfos":[]},"errorSummary":null,"error":null,"workflows":[],"startTime":1502079119800,"submitTime":1502079119781,"finishTime":1502079119938,"collapsed":false,"bindings":{},"inputWidgets":{},"displayType":"table","width":"auto","height":"auto","xColumns":null,"yColumns":null,"pivotColumns":null,"pivotAggregation":null,"customPlotOptions":{},"commentThread":[],"commentsVisible":false,"parentHierarchy":[],"diffInserts":[],"diffDeletes":[],"globalVars":{},"latestUser":"a user","commandTitle":"","showCommandTitle":false,"hideCommandCode":false,"hideCommandResult":false,"iPythonMetadata":null,"streamStates":{},"nuid":"277d03e0-5883-487a-ba33-1334020c6876"},{"version":"CommandV1","origId":839630435663137,"guid":"a2218e97-7474-4d8d-9c18-5576fad959b4","subtype":"command","commandType":"auto","position":73.0,"command":"%md\n<h4>Generic Classs </h4>","commandVersion":0,"state":"finished","results":null,"errorSummary":null,"error":null,"workflows":[],"startTime":0,"submitTime":0,"finishTime":0,"collapsed":false,"bindings":{},"inputWidgets":{},"displayType":"table","width":"auto","height":"auto","xColumns":null,"yColumns":null,"pivotColumns":null,"pivotAggregation":null,"customPlotOptions":{},"commentThread":[],"commentsVisible":false,"parentHierarchy":[],"diffInserts":[],"diffDeletes":[],"globalVars":{},"latestUser":"a user","commandTitle":"","showCommandTitle":false,"hideCommandCode":false,"hideCommandResult":false,"iPythonMetadata":null,"streamStates":{},"nuid":"2faef3c0-b9d1-4a67-b096-518539ae065d"},{"version":"CommandV1","origId":839630435663138,"guid":"24f8423b-af0c-4a43-93b8-7e703ffbb4bc","subtype":"command","commandType":"auto","position":74.0,"command":"class Stack[A] {\n private var elements: List[A] = Nil\n def push(x: A) { elements = x :: elements }\n def peek: A = elements.head\n def pop(): A = {\n val currentTop = peek\n elements = elements.tail\n currentTop\n }\n}","commandVersion":0,"state":"finished","results":{"type":"html","data":"<div class=\"ansiout\">defined class Stack\n</div>","arguments":{},"addedWidgets":{},"removedWidgets":[],"datasetInfos":[]},"errorSummary":null,"error":null,"workflows":[],"startTime":1502079341412,"submitTime":1502079341391,"finishTime":1502079341598,"collapsed":false,"bindings":{},"inputWidgets":{},"displayType":"table","width":"auto","height":"auto","xColumns":null,"yColumns":null,"pivotColumns":null,"pivotAggregation":null,"customPlotOptions":{},"commentThread":[],"commentsVisible":false,"parentHierarchy":[],"diffInserts":[],"diffDeletes":[],"globalVars":{},"latestUser":"a user","commandTitle":"","showCommandTitle":false,"hideCommandCode":false,"hideCommandResult":false,"iPythonMetadata":null,"streamStates":{},"nuid":"72644ddc-155c-43f5-ac53-dbeb28f0e399"},{"version":"CommandV1","origId":839630435663139,"guid":"081f4838-8103-4c94-bf64-a4a9942b35b5","subtype":"command","commandType":"auto","position":75.0,"command":"val stack = new Stack[Int]\nstack.push(1)\nstack.push(2)\nprintln(stack.pop) // prints 2\nprintln(stack.pop) // prints 1","commandVersion":0,"state":"finished","results":{"type":"html","data":"<div class=\"ansiout\">2\n1\nstack: Stack[Int] = $iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC$Stack@1acecee7\n</div>","arguments":{},"addedWidgets":{},"removedWidgets":[],"datasetInfos":[]},"errorSummary":null,"error":null,"workflows":[],"startTime":1502079375872,"submitTime":1502079375852,"finishTime":1502079376028,"collapsed":false,"bindings":{},"inputWidgets":{},"displayType":"table","width":"auto","height":"auto","xColumns":null,"yColumns":null,"pivotColumns":null,"pivotAggregation":null,"customPlotOptions":{},"commentThread":[],"commentsVisible":false,"parentHierarchy":[],"diffInserts":[],"diffDeletes":[],"globalVars":{},"latestUser":"a user","commandTitle":"","showCommandTitle":false,"hideCommandCode":false,"hideCommandResult":false,"iPythonMetadata":null,"streamStates":{},"nuid":"1cccce5f-dbcc-42dc-85c0-df46042c8293"},{"version":"CommandV1","origId":839630435663140,"guid":"d796d49f-1e9b-4a0d-a750-49ad2d20b760","subtype":"command","commandType":"auto","position":76.0,"command":"class Fruit\nclass Apple extends Fruit\nclass Banana extends Fruit\n\nval stack = new Stack[Fruit]\nval apple = new Apple\nval banana = new Banana\n\nstack.push(apple)\nstack.push(banana)","commandVersion":0,"state":"finished","results":{"type":"html","data":"<div class=\"ansiout\">defined class Fruit\ndefined class Apple\ndefined class Banana\nstack: Stack[Fruit] = $iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC$Stack@27eadfc3\napple: Apple = $iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC$Apple@7f0d3017\nbanana: Banana = $iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC$Banana@4c1b1b40\n</div>","arguments":{},"addedWidgets":{},"removedWidgets":[],"datasetInfos":[]},"errorSummary":null,"error":null,"workflows":[],"startTime":1502079650788,"submitTime":1502079650767,"finishTime":1502079650950,"collapsed":false,"bindings":{},"inputWidgets":{},"displayType":"table","width":"auto","height":"auto","xColumns":null,"yColumns":null,"pivotColumns":null,"pivotAggregation":null,"customPlotOptions":{},"commentThread":[],"commentsVisible":false,"parentHierarchy":[],"diffInserts":[],"diffDeletes":[],"globalVars":{},"latestUser":"a user","commandTitle":"","showCommandTitle":false,"hideCommandCode":false,"hideCommandResult":false,"iPythonMetadata":null,"streamStates":{},"nuid":"89ef3757-6b4f-4fcd-8a30-15e43e5e30a1"},{"version":"CommandV1","origId":839630435663141,"guid":"ec58d058-308c-46cc-9670-256ee0515792","subtype":"command","commandType":"auto","position":77.0,"command":"%md\n<h3>Inner Classes</h3>","commandVersion":0,"state":"finished","results":null,"errorSummary":null,"error":null,"workflows":[],"startTime":0,"submitTime":0,"finishTime":0,"collapsed":false,"bindings":{},"inputWidgets":{},"displayType":"table","width":"auto","height":"auto","xColumns":null,"yColumns":null,"pivotColumns":null,"pivotAggregation":null,"customPlotOptions":{},"commentThread":[],"commentsVisible":false,"parentHierarchy":[],"diffInserts":[],"diffDeletes":[],"globalVars":{},"latestUser":"a user","commandTitle":"","showCommandTitle":false,"hideCommandCode":false,"hideCommandResult":false,"iPythonMetadata":null,"streamStates":{},"nuid":"b77314a2-36ac-4a04-88af-0c6657723c69"},{"version":"CommandV1","origId":839630435663142,"guid":"30085100-dfd3-4327-8ff6-872c246f29f1","subtype":"command","commandType":"auto","position":78.0,"command":"class Graph {\n class Node {\n var connectedNodes: List[Node] = Nil\n def connectTo(node: Node) {\n if (connectedNodes.find(node.equals).isEmpty) {\n connectedNodes = node :: connectedNodes\n }\n }\n }\n var nodes: List[Node] = Nil\n def newNode: Node = {\n val res = new Node\n nodes = res :: nodes\n res\n }\n}","commandVersion":0,"state":"finished","results":{"type":"html","data":"<div class=\"ansiout\">defined class Graph\n</div>","arguments":{},"addedWidgets":{},"removedWidgets":[],"datasetInfos":[]},"errorSummary":"<div class=\"ansiout\">Unclosed block</div>","error":null,"workflows":[],"startTime":1502079737980,"submitTime":1502079737962,"finishTime":1502079738152,"collapsed":false,"bindings":{},"inputWidgets":{},"displayType":"table","width":"auto","height":"auto","xColumns":null,"yColumns":null,"pivotColumns":null,"pivotAggregation":null,"customPlotOptions":{},"commentThread":[],"commentsVisible":false,"parentHierarchy":[],"diffInserts":[],"diffDeletes":[],"globalVars":{},"latestUser":"a user","commandTitle":"","showCommandTitle":false,"hideCommandCode":false,"hideCommandResult":false,"iPythonMetadata":null,"streamStates":{},"nuid":"3142a162-0d0c-4740-b552-29bf4edf4bd7"},{"version":"CommandV1","origId":839630435663143,"guid":"b0a09dea-1a53-4a7a-bfb3-d4c6a43d8159","subtype":"command","commandType":"auto","position":79.0,"command":"val graph1: Graph = new Graph\nval node1: graph1.Node = graph1.newNode\nval node2: graph1.Node = graph1.newNode\nval node3: graph1.Node = graph1.newNode\nnode1.connectTo(node2)\nnode3.connectTo(node1)","commandVersion":0,"state":"finished","results":null,"errorSummary":null,"error":null,"workflows":[],"startTime":0,"submitTime":0,"finishTime":0,"collapsed":false,"bindings":{},"inputWidgets":{},"displayType":"table","width":"auto","height":"auto","xColumns":null,"yColumns":null,"pivotColumns":null,"pivotAggregation":null,"customPlotOptions":{},"commentThread":[],"commentsVisible":false,"parentHierarchy":[],"diffInserts":[],"diffDeletes":[],"globalVars":{},"latestUser":"a user","commandTitle":"","showCommandTitle":false,"hideCommandCode":false,"hideCommandResult":false,"iPythonMetadata":null,"streamStates":{},"nuid":"78820810-c0e2-47d6-a732-6eae3d5bb3cc"},{"version":"CommandV1","origId":1599163412699144,"guid":"e2e0c473-2116-4d62-aaa9-83b4c0118a31","subtype":"command","commandType":"auto","position":80.0,"command":"%md\n<h3>Abstract Types</h3>","commandVersion":0,"state":"error","results":null,"errorSummary":null,"error":null,"workflows":[],"startTime":0,"submitTime":0,"finishTime":0,"collapsed":false,"bindings":{},"inputWidgets":{},"displayType":"table","width":"auto","height":"auto","xColumns":null,"yColumns":null,"pivotColumns":null,"pivotAggregation":null,"customPlotOptions":{},"commentThread":[],"commentsVisible":false,"parentHierarchy":[],"diffInserts":[],"diffDeletes":[],"globalVars":{},"latestUser":"a user","commandTitle":"","showCommandTitle":false,"hideCommandCode":false,"hideCommandResult":false,"iPythonMetadata":null,"streamStates":{},"nuid":"2092f8e9-6f5d-4de5-b7eb-4d6ca3d9ccea"},{"version":"CommandV1","origId":1599163412699145,"guid":"64b33297-4195-4b7a-a4c9-a040ffb3d6af","subtype":"command","commandType":"auto","position":81.0,"command":"trait Buffer {\n type T\n val element: T\n}","commandVersion":0,"state":"finished","results":{"type":"html","data":"<div class=\"ansiout\">defined trait Buffer\n</div>","arguments":{},"addedWidgets":{},"removedWidgets":[],"datasetInfos":[]},"errorSummary":null,"error":null,"workflows":[],"startTime":1502248315562,"submitTime":1502248315277,"finishTime":1502248320670,"collapsed":false,"bindings":{},"inputWidgets":{},"displayType":"table","width":"auto","height":"auto","xColumns":null,"yColumns":null,"pivotColumns":null,"pivotAggregation":null,"customPlotOptions":{},"commentThread":[],"commentsVisible":false,"parentHierarchy":[],"diffInserts":[],"diffDeletes":[],"globalVars":{},"latestUser":"a user","commandTitle":"","showCommandTitle":false,"hideCommandCode":false,"hideCommandResult":false,"iPythonMetadata":null,"streamStates":{},"nuid":"21c09d24-4ad5-4304-8304-9bc18c488703"},{"version":"CommandV1","origId":1599163412699146,"guid":"a1b1afa5-7e1d-4592-8d06-5b87998d43f4","subtype":"command","commandType":"auto","position":82.0,"command":"abstract class SeqBuffer extends Buffer {\n type U\n type T <: Seq[U]\n def length = element.length\n}","commandVersion":0,"state":"finished","results":{"type":"html","data":"<div class=\"ansiout\">defined class SeqBuffer\n</div>","arguments":{},"addedWidgets":{},"removedWidgets":[],"datasetInfos":[]},"errorSummary":null,"error":null,"workflows":[],"startTime":1502248480055,"submitTime":1502248480032,"finishTime":1502248480397,"collapsed":false,"bindings":{},"inputWidgets":{},"displayType":"table","width":"auto","height":"auto","xColumns":null,"yColumns":null,"pivotColumns":null,"pivotAggregation":null,"customPlotOptions":{},"commentThread":[],"commentsVisible":false,"parentHierarchy":[],"diffInserts":[],"diffDeletes":[],"globalVars":{},"latestUser":"a user","commandTitle":"","showCommandTitle":false,"hideCommandCode":false,"hideCommandResult":false,"iPythonMetadata":null,"streamStates":{},"nuid":"7698722f-aa98-4648-b013-4c43aac6933a"},{"version":"CommandV1","origId":1599163412699147,"guid":"44f9aa75-55e9-4276-b32e-09e45d419f90","subtype":"command","commandType":"auto","position":83.0,"command":"abstract class IntSeqBuffer extends SeqBuffer {\n type U = Int\n}\n","commandVersion":0,"state":"finished","results":{"type":"html","data":"<div class=\"ansiout\">defined class IntSeqBuffer\n</div>","arguments":{},"addedWidgets":{},"removedWidgets":[],"datasetInfos":[]},"errorSummary":null,"error":null,"workflows":[],"startTime":1502248505655,"submitTime":1502248505633,"finishTime":1502248505799,"collapsed":false,"bindings":{},"inputWidgets":{},"displayType":"table","width":"auto","height":"auto","xColumns":null,"yColumns":null,"pivotColumns":null,"pivotAggregation":null,"customPlotOptions":{},"commentThread":[],"commentsVisible":false,"parentHierarchy":[],"diffInserts":[],"diffDeletes":[],"globalVars":{},"latestUser":"a user","commandTitle":"","showCommandTitle":false,"hideCommandCode":false,"hideCommandResult":false,"iPythonMetadata":null,"streamStates":{},"nuid":"fe2b0d42-daa8-41cb-a46f-3d67d1f25419"},{"version":"CommandV1","origId":1599163412699148,"guid":"64d82e4e-9d22-4d2b-b1b4-0e26da9fe338","subtype":"command","commandType":"auto","position":84.0,"command":"def newIntSeqBuf(elem1: Int, elem2: Int): IntSeqBuffer =\n new IntSeqBuffer {\n type T = List[U]\n val element = List(elem1, elem2)\n }","commandVersion":0,"state":"finished","results":{"type":"html","data":"<div class=\"ansiout\">newIntSeqBuf: (elem1: Int, elem2: Int)IntSeqBuffer\n</div>","arguments":{},"addedWidgets":{},"removedWidgets":[],"datasetInfos":[]},"errorSummary":null,"error":null,"workflows":[],"startTime":1502248529114,"submitTime":1502248529092,"finishTime":1502248529774,"collapsed":false,"bindings":{},"inputWidgets":{},"displayType":"table","width":"auto","height":"auto","xColumns":null,"yColumns":null,"pivotColumns":null,"pivotAggregation":null,"customPlotOptions":{},"commentThread":[],"commentsVisible":false,"parentHierarchy":[],"diffInserts":[],"diffDeletes":[],"globalVars":{},"latestUser":"a user","commandTitle":"","showCommandTitle":false,"hideCommandCode":false,"hideCommandResult":false,"iPythonMetadata":null,"streamStates":{},"nuid":"5258fdd4-3eda-4405-bc06-18d78cb463fd"},{"version":"CommandV1","origId":1599163412699149,"guid":"3b69bef4-31b5-49d3-adfe-a0405eb2bfba","subtype":"command","commandType":"auto","position":85.0,"command":"val buf = newIntSeqBuf(7, 8)\nprintln(\"length = \" + buf.length)\nprintln(\"content = \" + buf.element)","commandVersion":0,"state":"error","results":null,"errorSummary":null,"error":null,"workflows":[],"startTime":0,"submitTime":0,"finishTime":0,"collapsed":false,"bindings":{},"inputWidgets":{},"displayType":"table","width":"auto","height":"auto","xColumns":null,"yColumns":null,"pivotColumns":null,"pivotAggregation":null,"customPlotOptions":{},"commentThread":[],"commentsVisible":false,"parentHierarchy":[],"diffInserts":[],"diffDeletes":[],"globalVars":{},"latestUser":"a user","commandTitle":"","showCommandTitle":false,"hideCommandCode":false,"hideCommandResult":false,"iPythonMetadata":null,"streamStates":{},"nuid":"890b987b-3914-4194-8461-43323bfdfd7e"},{"version":"CommandV1","origId":1599163412699150,"guid":"4ab7aa53-e2a0-4f7d-8473-73fc9f3e9fe4","subtype":"command","commandType":"auto","position":86.0,"command":"%md\n<h3>Self-Type</h3>\n* Self-types are a way to declare that a trait must be mixed into another trait, even though it doesn’t directly extend it. That makes the members of the dependency available without imports.\n\n* A self-type is a way to narrow the type of this or another identifier that aliases this. The syntax looks like normal function syntax but means something entirely different.","commandVersion":0,"state":"error","results":null,"errorSummary":null,"error":null,"workflows":[],"startTime":0,"submitTime":0,"finishTime":0,"collapsed":false,"bindings":{},"inputWidgets":{},"displayType":"table","width":"auto","height":"auto","xColumns":null,"yColumns":null,"pivotColumns":null,"pivotAggregation":null,"customPlotOptions":{},"commentThread":[],"commentsVisible":false,"parentHierarchy":[],"diffInserts":[],"diffDeletes":[],"globalVars":{},"latestUser":"a user","commandTitle":"","showCommandTitle":false,"hideCommandCode":false,"hideCommandResult":false,"iPythonMetadata":null,"streamStates":{},"nuid":"0fd4788c-5fc5-4a75-9435-5c740f4a434b"},{"version":"CommandV1","origId":1599163412699151,"guid":"aed334bd-dd02-4b76-b2ab-06d7bf8311e2","subtype":"command","commandType":"auto","position":87.0,"command":"trait User {\n def username: String\n}","commandVersion":0,"state":"finished","results":{"type":"html","data":"<div class=\"ansiout\">defined trait User\n</div>","arguments":{},"addedWidgets":{},"removedWidgets":[],"datasetInfos":[]},"errorSummary":null,"error":null,"workflows":[],"startTime":1502249079737,"submitTime":1502249079713,"finishTime":1502249079852,"collapsed":false,"bindings":{},"inputWidgets":{},"displayType":"table","width":"auto","height":"auto","xColumns":null,"yColumns":null,"pivotColumns":null,"pivotAggregation":null,"customPlotOptions":{},"commentThread":[],"commentsVisible":false,"parentHierarchy":[],"diffInserts":[],"diffDeletes":[],"globalVars":{},"latestUser":"a user","commandTitle":"","showCommandTitle":false,"hideCommandCode":false,"hideCommandResult":false,"iPythonMetadata":null,"streamStates":{},"nuid":"5a51919e-e665-4c18-8966-1832663063cc"},{"version":"CommandV1","origId":1599163412699152,"guid":"4947def7-ff0b-45b2-bba0-ded78959e987","subtype":"command","commandType":"auto","position":88.0,"command":"trait Tweeter {\n\tthis: User => // reassign this\n\tdef tweet(tweetText: String) = println(s\"$username: $tweetText\")\n}","commandVersion":0,"state":"finished","results":{"type":"html","data":"<div class=\"ansiout\">defined trait Tweeter\n</div>","arguments":{},"addedWidgets":{},"removedWidgets":[],"datasetInfos":[]},"errorSummary":null,"error":null,"workflows":[],"startTime":1502249106023,"submitTime":1502249105999,"finishTime":1502249106210,"collapsed":false,"bindings":{},"inputWidgets":{},"displayType":"table","width":"auto","height":"auto","xColumns":null,"yColumns":null,"pivotColumns":null,"pivotAggregation":null,"customPlotOptions":{},"commentThread":[],"commentsVisible":false,"parentHierarchy":[],"diffInserts":[],"diffDeletes":[],"globalVars":{},"latestUser":"a user","commandTitle":"","showCommandTitle":false,"hideCommandCode":false,"hideCommandResult":false,"iPythonMetadata":null,"streamStates":{},"nuid":"36aacb72-7a3c-4bcf-9be9-e6630f8dfe5e"},{"version":"CommandV1","origId":1599163412699153,"guid":"1b17c264-b5c7-4464-9fb9-d49158bf4f33","subtype":"command","commandType":"auto","position":89.0,"command":"class VerifiedTweeter(val username_ : String) extends Tweeter with User { // We mixin User because Tweeter required it\n\tdef username = s\"real $username_\"\n}","commandVersion":0,"state":"finished","results":{"type":"html","data":"<div class=\"ansiout\">defined class VerifiedTweeter\n</div>","arguments":{},"addedWidgets":{},"removedWidgets":[],"datasetInfos":[]},"errorSummary":null,"error":null,"workflows":[],"startTime":1502249233325,"submitTime":1502249233302,"finishTime":1502249233551,"collapsed":false,"bindings":{},"inputWidgets":{},"displayType":"table","width":"auto","height":"auto","xColumns":null,"yColumns":null,"pivotColumns":null,"pivotAggregation":null,"customPlotOptions":{},"commentThread":[],"commentsVisible":false,"parentHierarchy":[],"diffInserts":[],"diffDeletes":[],"globalVars":{},"latestUser":"a user","commandTitle":"","showCommandTitle":false,"hideCommandCode":false,"hideCommandResult":false,"iPythonMetadata":null,"streamStates":{},"nuid":"e150c91e-88da-4cec-acdf-414cd46e58ba"},{"version":"CommandV1","origId":1599163412699154,"guid":"29799aa9-39c1-4953-8cc7-92eaae8fb32c","subtype":"command","commandType":"auto","position":90.0,"command":"val realBeyoncé = new VerifiedTweeter(\"Beyoncé\")\nrealBeyoncé.tweet(\"Just spilled my glass of lemonade\")","commandVersion":0,"state":"finished","results":{"type":"html","data":"<div class=\"ansiout\">real Beyoncé: Just spilled my glass of lemonade\nrealBeyoncé: VerifiedTweeter = $iwC$$iwC$$iwC$$iwC$$iwC$$iwC$VerifiedTweeter@2f3bf414\n</div>","arguments":{},"addedWidgets":{},"removedWidgets":[],"datasetInfos":[]},"errorSummary":null,"error":null,"workflows":[],"startTime":1502249339083,"submitTime":1502249339057,"finishTime":1502249339211,"collapsed":false,"bindings":{},"inputWidgets":{},"displayType":"table","width":"auto","height":"auto","xColumns":null,"yColumns":null,"pivotColumns":null,"pivotAggregation":null,"customPlotOptions":{},"commentThread":[],"commentsVisible":false,"parentHierarchy":[],"diffInserts":[],"diffDeletes":[],"globalVars":{},"latestUser":"a user","commandTitle":"","showCommandTitle":false,"hideCommandCode":false,"hideCommandResult":false,"iPythonMetadata":null,"streamStates":{},"nuid":"6d9b58ba-cf68-4a38-865c-ac0fcbea421d"},{"version":"CommandV1","origId":1599163412699155,"guid":"1dc74599-984d-4ca7-a2ff-7f29821e9b72","subtype":"command","commandType":"auto","position":91.0,"command":"%md\n<h3>Collections</h3>\n* mutable\n* immutable\n* generic","commandVersion":0,"state":"error","results":null,"errorSummary":null,"error":null,"workflows":[],"startTime":0,"submitTime":0,"finishTime":0,"collapsed":false,"bindings":{},"inputWidgets":{},"displayType":"table","width":"auto","height":"auto","xColumns":null,"yColumns":null,"pivotColumns":null,"pivotAggregation":null,"customPlotOptions":{},"commentThread":[],"commentsVisible":false,"parentHierarchy":[],"diffInserts":[],"diffDeletes":[],"globalVars":{},"latestUser":"a user","commandTitle":"","showCommandTitle":false,"hideCommandCode":false,"hideCommandResult":false,"iPythonMetadata":null,"streamStates":{},"nuid":"adc877b0-2aba-442f-b5de-bf8174c32245"},{"version":"CommandV1","origId":1599163412699156,"guid":"9a591a97-e8ce-4d58-b299-dd6b1a32130e","subtype":"command","commandType":"auto","position":92.0,"command":"import scala.collection.mutable","commandVersion":0,"state":"finished","results":{"type":"html","data":"<div class=\"ansiout\">import scala.collection.mutable\n</div>","arguments":{},"addedWidgets":{},"removedWidgets":[],"datasetInfos":[]},"errorSummary":null,"error":null,"workflows":[],"startTime":1502249817120,"submitTime":1502249817095,"finishTime":1502249817213,"collapsed":false,"bindings":{},"inputWidgets":{},"displayType":"table","width":"auto","height":"auto","xColumns":null,"yColumns":null,"pivotColumns":null,"pivotAggregation":null,"customPlotOptions":{},"commentThread":[],"commentsVisible":false,"parentHierarchy":[],"diffInserts":[],"diffDeletes":[],"globalVars":{},"latestUser":"a user","commandTitle":"","showCommandTitle":false,"hideCommandCode":false,"hideCommandResult":false,"iPythonMetadata":null,"streamStates":{},"nuid":"2a5e4f90-3bb6-46d0-86a0-c588ecfedea5"},{"version":"CommandV1","origId":1599163412699157,"guid":"1979d914-3efe-4eae-908c-ea4cd8358c3b","subtype":"command","commandType":"auto","position":93.0,"command":"%md\n<h3>Important Traits</h3>\n* Trait Traversable - ++, map, conversions, copying operations, size info, element retrival, slicing, element tests, max, min, string\n* Trait Iterable - iterator, other iterators, Sub-collections, zippers\n* Seq Trait - indexing & length, index search operation, addition operations, update operations, sorting operations, reversal operations","commandVersion":0,"state":"error","results":null,"errorSummary":null,"error":null,"workflows":[],"startTime":0,"submitTime":0,"finishTime":0,"collapsed":false,"bindings":{},"inputWidgets":{},"displayType":"table","width":"auto","height":"auto","xColumns":null,"yColumns":null,"pivotColumns":null,"pivotAggregation":null,"customPlotOptions":{},"commentThread":[],"commentsVisible":false,"parentHierarchy":[],"diffInserts":[],"diffDeletes":[],"globalVars":{},"latestUser":"a user","commandTitle":"","showCommandTitle":false,"hideCommandCode":false,"hideCommandResult":false,"iPythonMetadata":null,"streamStates":{},"nuid":"bda1b544-92a5-4f1e-b06d-3a7edaedc2f1"},{"version":"CommandV1","origId":1599163412699158,"guid":"48bb623c-545c-4cee-8caf-ed0a41adf70e","subtype":"command","commandType":"auto","position":94.0,"command":"%md\n<h3>Buffers</h3>","commandVersion":0,"state":"error","results":null,"errorSummary":null,"error":null,"workflows":[],"startTime":0,"submitTime":0,"finishTime":0,"collapsed":false,"bindings":{},"inputWidgets":{},"displayType":"table","width":"auto","height":"auto","xColumns":null,"yColumns":null,"pivotColumns":null,"pivotAggregation":null,"customPlotOptions":{},"commentThread":[],"commentsVisible":false,"parentHierarchy":[],"diffInserts":[],"diffDeletes":[],"globalVars":{},"latestUser":"a user","commandTitle":"","showCommandTitle":false,"hideCommandCode":false,"hideCommandResult":false,"iPythonMetadata":null,"streamStates":{},"nuid":"3f3bd7b9-a3f0-4b4c-b741-8f1851d1c2c8"},{"version":"CommandV1","origId":1599163412699159,"guid":"2ac2a082-75eb-498c-adb4-3666339d940a","subtype":"command","commandType":"auto","position":95.0,"command":"import scala.collection.mutable.ListBuffer","commandVersion":0,"state":"finished","results":{"type":"html","data":"<div class=\"ansiout\">import scala.collection.mutable.Buffer\n</div>","arguments":{},"addedWidgets":{},"removedWidgets":[],"datasetInfos":[]},"errorSummary":null,"error":null,"workflows":[],"startTime":1502250764202,"submitTime":1502250764189,"finishTime":1502250764296,"collapsed":false,"bindings":{},"inputWidgets":{},"displayType":"table","width":"auto","height":"auto","xColumns":null,"yColumns":null,"pivotColumns":null,"pivotAggregation":null,"customPlotOptions":{},"commentThread":[],"commentsVisible":false,"parentHierarchy":[],"diffInserts":[],"diffDeletes":[],"globalVars":{},"latestUser":"a user","commandTitle":"","showCommandTitle":false,"hideCommandCode":false,"hideCommandResult":false,"iPythonMetadata":null,"streamStates":{},"nuid":"47a0bc7c-9b9e-47f2-b78a-3a838fc70cdf"},{"version":"CommandV1","origId":1599163412699160,"guid":"c091a641-d906-4d8e-8cd8-4291ddc7a6de","subtype":"command","commandType":"auto","position":96.0,"command":"val v = Buffer(\"abc\",\"def\",\"ghi\")","commandVersion":0,"state":"finished","results":{"type":"html","data":"<div class=\"ansiout\">v: scala.collection.mutable.Buffer[String] = ArrayBuffer(abc, def, ghi)\n</div>","arguments":{},"addedWidgets":{},"removedWidgets":[],"datasetInfos":[]},"errorSummary":"<div class=\"ansiout\"><console>:2: error: ';' expected but ',' found.\n val v = Buffer"abc","def","ghi")\n ^\n</div>","error":null,"workflows":[],"startTime":1502250873900,"submitTime":1502250873890,"finishTime":1502250873982,"collapsed":false,"bindings":{},"inputWidgets":{},"displayType":"table","width":"auto","height":"auto","xColumns":null,"yColumns":null,"pivotColumns":null,"pivotAggregation":null,"customPlotOptions":{},"commentThread":[],"commentsVisible":false,"parentHierarchy":[],"diffInserts":[],"diffDeletes":[],"globalVars":{},"latestUser":"a user","commandTitle":"","showCommandTitle":false,"hideCommandCode":false,"hideCommandResult":false,"iPythonMetadata":null,"streamStates":{},"nuid":"7172949a-c54c-4e22-aa62-7c22ef80a0ae"},{"version":"CommandV1","origId":1599163412699161,"guid":"39caa9e3-2d00-4f69-ac9e-dcda7ed956a7","subtype":"command","commandType":"auto","position":97.0,"command":"v += \"xyz\"","commandVersion":0,"state":"finished","results":{"type":"html","data":"<div class=\"ansiout\">res5: v.type = ArrayBuffer(abc, def, ghi, xyz)\n</div>","arguments":{},"addedWidgets":{},"removedWidgets":[],"datasetInfos":[]},"errorSummary":null,"error":null,"workflows":[],"startTime":1502250887101,"submitTime":1502250887082,"finishTime":1502250887192,"collapsed":false,"bindings":{},"inputWidgets":{},"displayType":"table","width":"auto","height":"auto","xColumns":null,"yColumns":null,"pivotColumns":null,"pivotAggregation":null,"customPlotOptions":{},"commentThread":[],"commentsVisible":false,"parentHierarchy":[],"diffInserts":[],"diffDeletes":[],"globalVars":{},"latestUser":"a user","commandTitle":"","showCommandTitle":false,"hideCommandCode":false,"hideCommandResult":false,"iPythonMetadata":null,"streamStates":{},"nuid":"907aabdc-0544-41fb-906b-41d15fb3428f"},{"version":"CommandV1","origId":1599163412699162,"guid":"9cec6d9b-1d5d-4b14-b2bd-f002dfba307a","subtype":"command","commandType":"auto","position":98.0,"command":"v += (\"tuv\",\"ghy\",\"kjl\")","commandVersion":0,"state":"finished","results":{"type":"html","data":"<div class=\"ansiout\">res7: v.type = ArrayBuffer(abc, def, ghi, xyz, tuv, ghy, kjl)\n</div>","arguments":{},"addedWidgets":{},"removedWidgets":[],"datasetInfos":[]},"errorSummary":null,"error":null,"workflows":[],"startTime":1502250926265,"submitTime":1502250926246,"finishTime":1502250926447,"collapsed":false,"bindings":{},"inputWidgets":{},"displayType":"table","width":"auto","height":"auto","xColumns":null,"yColumns":null,"pivotColumns":null,"pivotAggregation":null,"customPlotOptions":{},"commentThread":[],"commentsVisible":false,"parentHierarchy":[],"diffInserts":[],"diffDeletes":[],"globalVars":{},"latestUser":"a user","commandTitle":"","showCommandTitle":false,"hideCommandCode":false,"hideCommandResult":false,"iPythonMetadata":null,"streamStates":{},"nuid":"f2f32e77-a5a0-4870-a17b-5b7b83e970f6"},{"version":"CommandV1","origId":1599163412699163,"guid":"a4c4cd3b-edbc-4140-a9a4-edc3015cb41e","subtype":"command","commandType":"auto","position":99.0,"command":"val y = Buffer(\"jkl\", \"ukl\")","commandVersion":0,"state":"finished","results":{"type":"html","data":"<div class=\"ansiout\">y: scala.collection.mutable.Buffer[String] = ArrayBuffer(jkl, ukl)\n</div>","arguments":{},"addedWidgets":{},"removedWidgets":[],"datasetInfos":[]},"errorSummary":null,"error":null,"workflows":[],"startTime":1502250977817,"submitTime":1502250977798,"finishTime":1502250977897,"collapsed":false,"bindings":{},"inputWidgets":{},"displayType":"table","width":"auto","height":"auto","xColumns":null,"yColumns":null,"pivotColumns":null,"pivotAggregation":null,"customPlotOptions":{},"commentThread":[],"commentsVisible":false,"parentHierarchy":[],"diffInserts":[],"diffDeletes":[],"globalVars":{},"latestUser":"a user","commandTitle":"","showCommandTitle":false,"hideCommandCode":false,"hideCommandResult":false,"iPythonMetadata":null,"streamStates":{},"nuid":"9e701209-4c17-4b32-9884-60bc8b9bab62"},{"version":"CommandV1","origId":1599163412699164,"guid":"cdcd0e46-fbf0-4269-a228-c633eba667de","subtype":"command","commandType":"auto","position":100.0,"command":"v ++= y","commandVersion":0,"state":"finished","results":{"type":"html","data":"<div class=\"ansiout\">res8: v.type = ArrayBuffer(abc, def, ghi, xyz, tuv, ghy, kjl, jkl, ukl)\n</div>","arguments":{},"addedWidgets":{},"removedWidgets":[],"datasetInfos":[]},"errorSummary":null,"error":null,"workflows":[],"startTime":1502250989548,"submitTime":1502250989530,"finishTime":1502250989631,"collapsed":false,"bindings":{},"inputWidgets":{},"displayType":"table","width":"auto","height":"auto","xColumns":null,"yColumns":null,"pivotColumns":null,"pivotAggregation":null,"customPlotOptions":{},"commentThread":[],"commentsVisible":false,"parentHierarchy":[],"diffInserts":[],"diffDeletes":[],"globalVars":{},"latestUser":"a user","commandTitle":"","showCommandTitle":false,"hideCommandCode":false,"hideCommandResult":false,"iPythonMetadata":null,"streamStates":{},"nuid":"ae453c2e-4dcc-469f-9f5f-326d2d74c983"},{"version":"CommandV1","origId":1599163412699165,"guid":"d2b69597-7d8d-4d11-b8be-bac0a1292787","subtype":"command","commandType":"auto","position":101.0,"command":"\"jkl\" +=:v","commandVersion":0,"state":"finished","results":{"type":"html","data":"<div class=\"ansiout\">res9: v.type = ArrayBuffer(jkl, abc, def, ghi, xyz, tuv, ghy, kjl, jkl, ukl)\n</div>","arguments":{},"addedWidgets":{},"removedWidgets":[],"datasetInfos":[]},"errorSummary":null,"error":null,"workflows":[],"startTime":1502251066448,"submitTime":1502251066429,"finishTime":1502251066539,"collapsed":false,"bindings":{},"inputWidgets":{},"displayType":"table","width":"auto","height":"auto","xColumns":null,"yColumns":null,"pivotColumns":null,"pivotAggregation":null,"customPlotOptions":{},"commentThread":[],"commentsVisible":false,"parentHierarchy":[],"diffInserts":[],"diffDeletes":[],"globalVars":{},"latestUser":"a user","commandTitle":"","showCommandTitle":false,"hideCommandCode":false,"hideCommandResult":false,"iPythonMetadata":null,"streamStates":{},"nuid":"74c51b29-0a57-404f-8816-b46bec4a0b2c"},{"version":"CommandV1","origId":1599163412699166,"guid":"8b9fdf99-97bd-4295-aaab-15e93fd6413d","subtype":"command","commandType":"auto","position":102.0,"command":"y ++=: v","commandVersion":0,"state":"finished","results":{"type":"html","data":"<div class=\"ansiout\">res11: v.type = ArrayBuffer(jkl, ukl, jkl, abc, def, ghi, xyz, tuv, ghy, kjl, jkl, ukl)\n</div>","arguments":{},"addedWidgets":{},"removedWidgets":[],"datasetInfos":[]},"errorSummary":"<div class=\"ansiout\"><console>:43: error: type mismatch;\n found : scala.collection.mutable.Buffer[String]\n required: String\n y +=: v\n ^\n</div>","error":null,"workflows":[],"startTime":1502251134372,"submitTime":1502251134353,"finishTime":1502251134469,"collapsed":false,"bindings":{},"inputWidgets":{},"displayType":"table","width":"auto","height":"auto","xColumns":null,"yColumns":null,"pivotColumns":null,"pivotAggregation":null,"customPlotOptions":{},"commentThread":[],"commentsVisible":false,"parentHierarchy":[],"diffInserts":[],"diffDeletes":[],"globalVars":{},"latestUser":"a user","commandTitle":"","showCommandTitle":false,"hideCommandCode":false,"hideCommandResult":false,"iPythonMetadata":null,"streamStates":{},"nuid":"6d655605-2244-434e-8485-84c09b371694"},{"version":"CommandV1","origId":1599163412699167,"guid":"73f24c5f-a77b-4b62-ae56-d7e5c629fc5d","subtype":"command","commandType":"auto","position":103.0,"command":"val fruit = Set(\"apple\", \"orange\", \"peach\", \"banana\")","commandVersion":0,"state":"finished","results":{"type":"html","data":"<div class=\"ansiout\">fruit: scala.collection.immutable.Set[String] = Set(apple, orange, peach, banana)\n</div>","arguments":{},"addedWidgets":{},"removedWidgets":[],"datasetInfos":[]},"errorSummary":null,"error":null,"workflows":[],"startTime":1502251342614,"submitTime":1502251342604,"finishTime":1502251342730,"collapsed":false,"bindings":{},"inputWidgets":{},"displayType":"table","width":"auto","height":"auto","xColumns":null,"yColumns":null,"pivotColumns":null,"pivotAggregation":null,"customPlotOptions":{},"commentThread":[],"commentsVisible":false,"parentHierarchy":[],"diffInserts":[],"diffDeletes":[],"globalVars":{},"latestUser":"a user","commandTitle":"","showCommandTitle":false,"hideCommandCode":false,"hideCommandResult":false,"iPythonMetadata":null,"streamStates":{},"nuid":"300ac8ed-b730-48fd-b9b6-d460b790b0fd"},{"version":"CommandV1","origId":1599163412699168,"guid":"0e427e95-d19f-440f-b766-e3f0abf2a098","subtype":"command","commandType":"auto","position":104.0,"command":"fruit + \"pineapple\"","commandVersion":0,"state":"finished","results":{"type":"html","data":"<div class=\"ansiout\">res13: scala.collection.immutable.Set[String] = Set(peach, banana, pineapple, orange, apple)\n</div>","arguments":{},"addedWidgets":{},"removedWidgets":[],"datasetInfos":[]},"errorSummary":null,"error":null,"workflows":[],"startTime":1502251442028,"submitTime":1502251442008,"finishTime":1502251442116,"collapsed":false,"bindings":{},"inputWidgets":{},"displayType":"table","width":"auto","height":"auto","xColumns":null,"yColumns":null,"pivotColumns":null,"pivotAggregation":null,"customPlotOptions":{},"commentThread":[],"commentsVisible":false,"parentHierarchy":[],"diffInserts":[],"diffDeletes":[],"globalVars":{},"latestUser":"a user","commandTitle":"","showCommandTitle":false,"hideCommandCode":false,"hideCommandResult":false,"iPythonMetadata":null,"streamStates":{},"nuid":"ba78d04a-f1d6-4f23-ae4f-c741c2721272"},{"version":"CommandV1","origId":1599163412699169,"guid":"50906a19-81ec-4bb3-9fb2-973d7d0d46f0","subtype":"command","commandType":"auto","position":105.0,"command":"import scala.collection.mutable.Set","commandVersion":0,"state":"finished","results":{"type":"html","data":"<div class=\"ansiout\">import scala.collection.mutable.Set\n</div>","arguments":{},"addedWidgets":{},"removedWidgets":[],"datasetInfos":[]},"errorSummary":null,"error":null,"workflows":[],"startTime":1502251642718,"submitTime":1502251642698,"finishTime":1502251642784,"collapsed":false,"bindings":{},"inputWidgets":{},"displayType":"table","width":"auto","height":"auto","xColumns":null,"yColumns":null,"pivotColumns":null,"pivotAggregation":null,"customPlotOptions":{},"commentThread":[],"commentsVisible":false,"parentHierarchy":[],"diffInserts":[],"diffDeletes":[],"globalVars":{},"latestUser":"a user","commandTitle":"","showCommandTitle":false,"hideCommandCode":false,"hideCommandResult":false,"iPythonMetadata":null,"streamStates":{},"nuid":"7adb161d-53e9-448a-879e-54cbc771b017"},{"version":"CommandV1","origId":1599163412699170,"guid":"5665d99a-c442-4e3c-afa6-decfa674bc7d","subtype":"command","commandType":"auto","position":106.0,"command":"val s = Set(\"apple\",\"orange\")","commandVersion":0,"state":"finished","results":{"type":"html","data":"<div class=\"ansiout\">s: scala.collection.mutable.Set[String] = Set(apple, orange)\n</div>","arguments":{},"addedWidgets":{},"removedWidgets":[],"datasetInfos":[]},"errorSummary":null,"error":null,"workflows":[],"startTime":1502251681543,"submitTime":1502251681523,"finishTime":1502251681626,"collapsed":false,"bindings":{},"inputWidgets":{},"displayType":"table","width":"auto","height":"auto","xColumns":null,"yColumns":null,"pivotColumns":null,"pivotAggregation":null,"customPlotOptions":{},"commentThread":[],"commentsVisible":false,"parentHierarchy":[],"diffInserts":[],"diffDeletes":[],"globalVars":{},"latestUser":"a user","commandTitle":"","showCommandTitle":false,"hideCommandCode":false,"hideCommandResult":false,"iPythonMetadata":null,"streamStates":{},"nuid":"516d94f8-7043-48bf-8b01-e193292e67d7"},{"version":"CommandV1","origId":1599163412699171,"guid":"788582da-890f-476d-a770-2fd6d2befa33","subtype":"command","commandType":"auto","position":107.0,"command":"s += \"Good\"","commandVersion":0,"state":"finished","results":{"type":"html","data":"<div class=\"ansiout\">res15: s.type = Set(Good, apple, orange)\n</div>","arguments":{},"addedWidgets":{},"removedWidgets":[],"datasetInfos":[]},"errorSummary":null,"error":null,"workflows":[],"startTime":1502251701418,"submitTime":1502251701397,"finishTime":1502251701503,"collapsed":false,"bindings":{},"inputWidgets":{},"displayType":"table","width":"auto","height":"auto","xColumns":null,"yColumns":null,"pivotColumns":null,"pivotAggregation":null,"customPlotOptions":{},"commentThread":[],"commentsVisible":false,"parentHierarchy":[],"diffInserts":[],"diffDeletes":[],"globalVars":{},"latestUser":"a user","commandTitle":"","showCommandTitle":false,"hideCommandCode":false,"hideCommandResult":false,"iPythonMetadata":null,"streamStates":{},"nuid":"92592e10-d063-40fe-a1f5-afed41fa299e"},{"version":"CommandV1","origId":1599163412699172,"guid":"150a0ff8-8b04-4f93-ab4b-fe1bcb889c37","subtype":"command","commandType":"auto","position":108.0,"command":"val m = Map((\"a\"->22),(\"b\"->55))","commandVersion":0,"state":"finished","results":{"type":"html","data":"<div class=\"ansiout\">m: scala.collection.immutable.Map[String,Int] = Map(a -> 22, b -> 55)\n</div>","arguments":{},"addedWidgets":{},"removedWidgets":[],"datasetInfos":[]},"errorSummary":null,"error":null,"workflows":[],"startTime":1502252161155,"submitTime":1502252161134,"finishTime":1502252161267,"collapsed":false,"bindings":{},"inputWidgets":{},"displayType":"table","width":"auto","height":"auto","xColumns":null,"yColumns":null,"pivotColumns":null,"pivotAggregation":null,"customPlotOptions":{},"commentThread":[],"commentsVisible":false,"parentHierarchy":[],"diffInserts":[],"diffDeletes":[],"globalVars":{},"latestUser":"a user","commandTitle":"","showCommandTitle":false,"hideCommandCode":false,"hideCommandResult":false,"iPythonMetadata":null,"streamStates":{},"nuid":"c5a37fdf-1f9d-4a0f-b60a-c6f2fec9d2ce"},{"version":"CommandV1","origId":1599163412699173,"guid":"a6edd599-eab3-4db9-8b00-25d6e19255dc","subtype":"command","commandType":"auto","position":109.0,"command":"m(\"a\")","commandVersion":0,"state":"finished","results":{"type":"html","data":"<div class=\"ansiout\">res18: Int = 22\n</div>","arguments":{},"addedWidgets":{},"removedWidgets":[],"datasetInfos":[]},"errorSummary":"<div class=\"ansiout\"><console>:44: error: not found: value k\n m get k\n ^\n</div>","error":null,"workflows":[],"startTime":1502252413812,"submitTime":1502252413789,"finishTime":1502252413933,"collapsed":false,"bindings":{},"inputWidgets":{},"displayType":"table","width":"auto","height":"auto","xColumns":null,"yColumns":null,"pivotColumns":null,"pivotAggregation":null,"customPlotOptions":{},"commentThread":[],"commentsVisible":false,"parentHierarchy":[],"diffInserts":[],"diffDeletes":[],"globalVars":{},"latestUser":"a user","commandTitle":"","showCommandTitle":false,"hideCommandCode":false,"hideCommandResult":false,"iPythonMetadata":null,"streamStates":{},"nuid":"84cfa331-80da-411c-b807-3afb3decdf2e"},{"version":"CommandV1","origId":1599163412699174,"guid":"1c9c4a6d-46a9-4f14-99ae-4bba4a408bbf","subtype":"command","commandType":"auto","position":110.0,"command":"m + (\"abc\"->1099)","commandVersion":0,"state":"finished","results":{"type":"html","data":"<div class=\"ansiout\">res19: scala.collection.immutable.Map[String,Int] = Map(a -> 22, b -> 55, abc -> 1099)\n</div>","arguments":{},"addedWidgets":{},"removedWidgets":[],"datasetInfos":[]},"errorSummary":"<div class=\"ansiout\"><console>:2: warning: Treating numbers with a leading zero as octal is deprecated.\n m + ("abc"->099)\n ^\n<console>:2: error: malformed integer number\n m + ("abc"->099)\n ^\n</div>","error":null,"workflows":[],"startTime":1502252459657,"submitTime":1502252459635,"finishTime":1502252459802,"collapsed":false,"bindings":{},"inputWidgets":{},"displayType":"table","width":"auto","height":"auto","xColumns":null,"yColumns":null,"pivotColumns":null,"pivotAggregation":null,"customPlotOptions":{},"commentThread":[],"commentsVisible":false,"parentHierarchy":[],"diffInserts":[],"diffDeletes":[],"globalVars":{},"latestUser":"a user","commandTitle":"","showCommandTitle":false,"hideCommandCode":false,"hideCommandResult":false,"iPythonMetadata":null,"streamStates":{},"nuid":"9b41865d-eedd-4b79-88f6-dfe38c6e08a6"}],"dashboards":[],"guid":"ab61f164-3051-4093-9183-7985b187657a","globalVars":{},"iPythonMetadata":null,"inputWidgets":{}};</script>
<script
src="https://databricks-prod-cloudfront.cloud.databricks.com/static/e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855/js/notebook-main.js"
onerror="window.mainJsLoadError = true;"></script>
</head>
<body>
<script>
if (window.mainJsLoadError) {
var u = 'https://databricks-prod-cloudfront.cloud.databricks.com/static/e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855/js/notebook-main.js';
var b = document.getElementsByTagName('body')[0];
var c = document.createElement('div');
c.innerHTML = ('<h1>Network Error</h1>' +
'<p><b>Please check your network connection and try again.</b></p>' +
'<p>Could not load a required resource: ' + u + '</p>');
c.style.margin = '30px';
c.style.padding = '20px 50px';
c.style.backgroundColor = '#f5f5f5';
c.style.borderRadius = '5px';
b.appendChild(c);
}
</script>
</body>
</html>