WEREWOLF UNRELATED THREAD

  • The FTB Forum is now read-only, and is here as an archive. To participate in our community discussions, please join our Discord! https://ftb.team/discord

Strikingwolf

New Member
Jul 29, 2019
3,709
-26
1
I'd love to learn a lot, I think Tord does to
But can you explain to me what Imperative and FP means?
Imperative:
  • Superset of Object-Oriented (centered around nouns [objects] and their interactions)
  • Changeable data
  • Telling the computer how to do something
Functional:
  • Unchangeable data (this sounds hard to use, but it is actually pretty easy)
  • Telling the computer what to do
  • Easier to do multi-threading in because of Immutable data
  • Centered around verbs (functions)
  • Functions are first-class data types, meaning they can be returned from functions, passed as arguements, or anything a data type can do
 

dylanpiera

New Member
Jul 29, 2019
161
0
0
Imperative:
  • Superset of Object-Oriented (centered around nouns [objects] and their interactions)
  • Changeable data
  • Telling the computer how to do something
Functional:
  • Unchangeable data (this sounds hard to use, but it is actually pretty easy)
  • Telling the computer what to do
  • Easier to do multi-threading in because of Immutable data
  • Centered around verbs (functions)
  • Functions are first-class data types, meaning they can be returned from functions, passed as arguements, or anything a data type can do
Ok

im at Control flow in ruby
on codecademy :p
 

trajing

New Member
Jul 29, 2019
3,091
-14
1
Code:
forum.users.each do |usr|
  if usr.name.downcase == 'coolsquid'
    usr = nil
  elsif usr.name.downcase == 'trajing' or usr.name.downcase == 'strikingwolf'
    puts 'You're okay. :)'
  else
    puts 'Okay, but I have my eye on you. <O>
  end
end