Sortof. But with a few caveats. 1) most computer viruses don't randomly vary, and thus don't have a learning effect, miss unlimited heredity. 2) they are not physical life, so the relevance is not the same as their chemical counterparts.
Of course, most of those viruses would probably just be rendered inert, printing a lot of segfaults into the kernel console.