Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add exercise to train simplification of if-else-expressions #773

Open
valterbergstrand opened this issue Nov 7, 2023 · 2 comments
Open
Assignees

Comments

@valterbergstrand
Copy link
Contributor

Title explains but an example would be something in the line of:

def isTrue(): Boolean = 
  if boolsktVärde == true then true
  else false

can be simplified to

def isTrue(): Boolean =
  boolsktVärde
@bjornregnell
Copy link
Member

bjornregnell commented Sep 8, 2024

I have added this slide:
image

@bjornregnell
Copy link
Member

TODO: Consider if also add an exercise in week 01 pr week 02. Check what's already there first...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants