chatbot as a function

  • 0 Replies
  • 221 Views
*

Zero

  • Trusty Member
  • *********
  • Terminator
  • *
  • 800
  • Ready?
    • Thinkbots are free
chatbot as a function
« on: July 19, 2019, 10:26:42 am »
Here is a Fibonacci algorithm implemented in Erlang:

Code: [Select]
fib(1) -> 1;
fib(2) -> 1;
fib(N) -> fib(N - 2) + fib(N - 1).

I was thinking, a chatbot is a bit like a huge function. The function parameter is the user's query, the returned value is the bot's reply. Maybe a programming language could be based on this idea, a chatbot as a function. A pattern on the left hand side, a template on the right hand side, sounds familiar. But in a functional language, functions call functions to do their work, so it would be like tiny chatbots asking things to other tiny chatbots in the thinkbot's mind. A thinking process.

 


Users Online

42 Guests, 1 User
Users active in past 15 minutes:
ivan.moony
[Trusty Member]

Most Online Today: 64. Most Online Ever: 340 (March 26, 2019, 09:47:57 pm)

Articles