├── .gitignore ├── .idea ├── kotlinc.xml ├── libraries │ └── KotlinJavaRuntime.xml ├── misc.xml ├── modules.xml ├── uiDesigner.xml ├── vcs.xml └── workspace.xml ├── IdiomaticKotlin.iml ├── README.md └── src ├── chap01_extension_functions ├── ExtensionFunction.kt ├── ExtensionProperties.kt └── InheritanceAndPolymorphism.kt ├── chap02_sealed_classes ├── LegacyApproach.kt └── SealedClass.kt ├── chap03_infix_function └── InfixFunction.kt ├── chap04_class_delegation └── DelegationSample.kt ├── chap05_local_function └── LocalFunction.kt ├── chap06_object_and_singleton └── Singleton.kt ├── chap07_sequence └── SequenceSample.kt ├── chap08_lambdas_sam_constructors ├── Invoke.kt ├── LambdaPass.kt ├── SAMConversion.kt └── View.java ├── chap09_lambda_receiver_dsl └── ViewCreator.kt ├── chap10_elvis_operator ├── ElvisSyntax.kt ├── ExpandedElvis.kt └── SafeCall.kt ├── chap11_property_delegation ├── Delegate.kt ├── LazyTest.kt ├── ManualLazy.kt └── ObservableTest.kt ├── chap12_higher_order_function_and_function_type └── FunctionType.kt ├── chap13_inline ├── InlinedFilter.kt ├── InlinedFunctionReference.kt ├── LambdaInstance.kt └── NotInlinedFilter.kt ├── chap14_lambda_and_control_flows ├── AnonymousFunctionReturns.kt ├── InlineReturn.kt ├── LambdaReturn.kt ├── NotinlineLambdaReturn.kt └── ReturnWithLabels.kt ├── chap15_reified_parameters ├── ReifiedParameter.kt ├── TypeErasure.kt └── TypeErasureLimitation.kt ├── chap16_noinline_crossinline ├── Crossinline.kt ├── Noinline.kt └── Safidfngd.java └── chap17_variance ├── Contravariance.java ├── Covariance.java ├── DeclarationSiteContravariance.kt ├── DeclarationSiteCovariance.kt ├── GenericInvariance.java ├── UseSiteVariance.kt └── Variance.java /.gitignore: -------------------------------------------------------------------------------- 1 | out/ 2 | -------------------------------------------------------------------------------- /.idea/kotlinc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 10 | -------------------------------------------------------------------------------- /.idea/libraries/KotlinJavaRuntime.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /.idea/uiDesigner.xml: -------------------------------------------------------------------------------- 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 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/workspace.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 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 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 121 | 122 | 123 | 125 | 126 | 131 | 132 | 133 | 188 | 189 | 190 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 |