How do I increment a attribute? I created a type User
data user = User{
username :: String,
passwort :: String,
points :: Int
}
user = user {username ="Test",
passwort="test123",
points=100
}
I want to increment the points by 10, I tryed to do something similar to this like in other programming lenguages points += 10
userplus10 = user{points = points +10}
(btw. this doesnt work) creating a new user but with another value at points.